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.
Related
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>
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>
I have a website running the following code:
<iframe class="fanbox" width="472" height="220" src="http://www.connect.facebook.com/widgets/fan.php?href=<?php echo urlencode('http://www.facebook.com/my-website-page'); ?>&width=472&colorscheme=light&show_faces=true&stream=false&header=false&height=220&css=<?php echo urlencode('http://mywebsite.com/css/fb-style.css'); ?>"></iframe>
It was working, but it's seems that facebook removed this method of getting the Fan Box. Now I receive a 404 Not Found Error: http://www.connect.facebook.com/widgets/fan.php
It was really removed/moved? How can I do this now?
You should use the Like Box here. If you just want the "Fans" images, then uncheck "stream", etc until you get what you desire. Then click "Get Code" and choose "IFrame" in the dialog box.
In your example, it would be:
<iframe src="//www.facebook.com/plugins/likebox.php?href=<?php echo urlencode('YOUR_FB_URL'); ?>&width=292&height=258&show_faces=true&colorscheme=light&stream=false&border_color&header=false&" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:258px;" allowTransparency="true"></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.
Frankly, I'm not sure what I'm doing wrong. This is my code, but for some reason, the map is outputting a blank iFrame with a source URL that if I click will send me to the proper map, so the URL is being input correctly, but it's not actually being displayed on my website.
<?php $addressStr ="516 East Liberty Street, Ann Arbor, MI 48104"; ?>
<iframe width="206" height="175" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="<?php echo "http://maps.googleapis.com/maps/api/staticmap?center={$addressStr}&zoom=15&size=204x173&markers=color:orange|{$addressStr}&sensor=true&output=embed"; ?>"></iframe>
It's not an iframe. You need a standard <img> tag ?