It will be placed within a template that returns dynamic channels
Php linking thats dynamic > http://domain.com/text.php?content=yourtext
doing so returns the text. "yourtext"
what i mean by this is "yourtext" will be added into embed codes thus being dynamic.
i am basically reconstructing a streaming sites layout.
EXAMPLE:
<iframe src="http://domain.tv/embed/video/<?php echo $yourtext ?>" frameborder="0" framespacing="0" width="100%" height="100%" /></iframe>
sorry for my poor english i will adjust it if it doesn't meet your english.
If you are trying to get yourtext from http://domain.com/text.php?content=yourtext
<iframe src="http://domain.tv/embed/video/<?= htmlspecialchars($_GET['content']) ?>" frameborder="0" framespacing="0" width="100%" height="100%" /></iframe>
Related
I am reading my database that contains various columns along those a varchar(500) named video_games_trailer that has the url's of youtube videos. So far everything is displaying fine but in the position that the video should be I get the following:
Not Found
The requested URL /Project/<embed width= was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an
ErrorDocument to handle the request.
I am displaying the columns with the code below
<?php while($row = mysqli_fetch_array($result)){?>
<tr>
<td><iframe width="560" height="315" frameborder="0"
allowfullscreen src="<?php echo
$row['video_games_trailer'];?>"></iframe></td>
</tr>
<?php } ?>
In the database I 've put
<embed width="560" height="315" src="https://www.youtube.com/embed/whatever">
Wherever I looked that was the proposed method, am I missing something and what can I do to fix this?
It looks as though if you're storing
<embed width="560" height="315" src="https://www.youtube.com/embed/whatever">
you should in fact be echoing out the following
<?php while($row = mysqli_fetch_array($result)){?>
<tr>
<td><?php echo
$row['video_games_trailer'];?>"></td>
</tr>
<?php } ?>
However, you're better off just storing say the watch ID part of the URL or just the URL.
I've done a lot of searching for possible ways to do this without success.
I have a directory with all the needed pages. I would like to have them all opened in one page so that I can then print them to pdf.
/allpages
page1.php
page2.php
page3.php
.....
page33.php
Is this possible to do or would it be too much for any browser?
If you have another php idea to put all pages into pdf without to much additional software
installed on server I'm open for that also. I've looked at several Linux PDF set up’s but could not seem to get them working or they needed many additional packages.
Thanks in advance
Created a separate php and called them all. Other than that all the pages were displayed one
after the other.
<div id="Html5" style="position:absolute;left:1px;top:2px;width:696px;height:30px;z-index:9">
<iframe src ="page1.php" width="750" height="1100"> </iframe>
<iframe src ="page2.php" width="750" height="1100"> </iframe>
<iframe src ="page3.php" width="750" height="1100"> </iframe>
<iframe src ="page4.php" width="750" height="1100"> </iframe>
<iframe src ="page5.php" width="750" height="1100"> </iframe>
</div>
Good day guys, I'm trying to learn codeigniter and I'm having a trouble displaying a php file in an iframe. Here's my code. It returns "404 Page not found"
here's my view:
<iframe class="tabContent" name="myIframe" src="<?php echo site_url('pages/view_about');? >" marginheight="8" marginwidth="8"></iframe>
then here's my controller:
function view_about(){
$this->load->view('pages/about');
}
here's how my folders are arranged
application->views->pages->about.php
application->contollers->pages.php
I would just like to add, the code I pasted above for my view is located in
application->views->templates->footer.php
the iframe is actually a part of my footer thanks
php ending tag has space between
try this..
<iframe class="tabContent" name="myIframe" src="<?php echo site_url('pages/view_about'); ?>" marginheight="8" marginwidth="8"></iframe>
Hi can you please try below code hope it will work for you.
Page 1
<iframe id="targetFrame" src="" width="100%" height="100%" scrolling="NO" frameborder="0" ></iframe>
Is there anyone that know a clever way to hide the src of an iframe?
<iframe src=
"<?php
$values = get_post_custom_values("my-custom-field");
echo $values[0];
?>"
width="100%"
height="500px"
frameborder="0">
</iframe>
As people have said in the comments, something which the browser requires cannot be hidden.
The only thing I can think of that comes close is using HTML Entities:
<iframe src=
"<?php
echo htmlentities($myurl);
?>"
width="100%"
height="500px"
frameborder="0">
</iframe>
Sorry but if there was a better way coded into actual browsers then it could be possible. This is probably the closest you're going to get though.
This is my first question, hence please ignore mistakes, if any.
I have an issue where I am serving three alternate layouts to my visitors based on the device they are surfing from.
Mobile, Tablet, and Desktop.
My website is in PHP and I am using just 280 bytes of JavaScript to determine the browser width of my visitor. There is no other JavaScript or any libraries like jQuery, MooTools. I want to keep my site very very light weight thus resulting in faster page load speeds.
I have a PHP variable called $layout and the the value to it is assigned by the JavaScript dynamically based on the browser width. The three values assigned to it are mobile or tablet or desktop
Now I have links in my xhtml which are like this:
<img src="cdn/images/desktop/image1.jpg" width="500" height="200" alt="image1">
<img src="cdn/images/desktop/image2.jpg" width="500" height="200" alt="image2">
<img src="cdn/images/desktop/image3.jpg" width="500" height="200" alt="image3">
By default images are loading from the cdn/images/desktop folder.
What I am looking for is if the value is $layout is tablet then the images should load from cdn/images/tablet folder and similarly if the valur of $layout is mobile then images should load from cdn/images/mobile folder.
Name of the images remain the same. They are three different resolutions in three different folders.
Kindly suggest a PHP solution if possible to do this in PHP.
Otherwise please suggest a plain JavaScript solution (No libraries like jQuery, MooTools ot any such)
Thanks
UPDATE
Actually I am using Joomla as a CMS so in my posts I cannot use PHP code within posts hence I want that after the page is rendered or during the rendering these paths must change.
$(function(){
//mobile or tablet or desktop
var client='<?php echo $layout; ?>'
if(client=='desktop'){
//do nothing
}else if(client=='tablet'){
$('#image-list img').each(function(){
$('this').attr('src',$(this).attr('src').replace('desktop','tablet'));
});
}else{
//mobile
$('#image-list img').each(function(){
$('this').attr('src',$(this).attr('src').replace('desktop','mobile'));
});
}
});
<div id="image-list">
<img src="cdn/images/desktop/image1.jpg" width="500" height="200" alt="image1">
<img src="cdn/images/desktop/image2.jpg" width="500" height="200" alt="image2">
<img src="cdn/images/desktop/image3.jpg" width="500" height="200" alt="image3">
</div>
use jQuery
sorry i didn't know it don't require lib.
var client='<?php echo $layout; ?>'
var list=document.getElementById('image-list');
var img=list.getElementsByTagName('img');
for(var i=0;i<img.length;i++){
//img[i].src=img[i].src.replace('desktop',client);
img[i].setAttribute('src',img[i].getAttribute('src-data').replace('desktop',client));
}
put it in the end of file.
<img src-data="cdn/images/desktop/image1.jpg" width="500" height="200" alt="image1">
Try this:
<img src="cdn/images/<?php echo $layout; ?>image3.jpg" width="500" height="200" alt="image3">
why don't you use simple javascript to change the src of the image ?
it's maybe not the most nicely looked script but you can do something like this:
xhtml file :
<img id="image1" src="cdn/images/desktop/image1.jpg" width="500" height="200" alt="image1">
<img id="image2" src="cdn/images/desktop/image2.jpg" width="500" height="200" alt="image2">
<img id="image3" src="cdn/images/desktop/image3.jpg" width="500" height="200" alt="image3">
after the javascript find out which layout is it just do:
document.getElementById("image1").src = "cdn/images/" + layout + "/image1.jpg";
document.getElementById("image2").src = "cdn/images/" + layout + "/image2.jpg";
document.getElementById("image3").src = "cdn/images/" + layout + "/image3.jpg";
is that what you mean ?