Included youtube video not working - php

I am including a Youtube video in my webpage, this is the code:
<div id="content">
<iframe class="aftermovie" width="800" height="450" src="//www.youtube.com/
embed/vjFA_UNSl9c?rel=0" frameborder="0" allowfullscreen>
</iframe>
</div>
The site is running in localhost, when I use Chrome to see the page I see the video but can't do anything, in Firefox everything runs like it is supposed to.

you need the http protocole in your src to make this work with chrome
<iframe class="aftermovie" width="800" height="450" src="http://www.youtube.com/embed/B4bb69Moff8?rel=0" frameborder="0" allowfullscreen></iframe>

Related

How can I hide actual YouTube video URLin codeingiter from user

<iframe width="853" height="480"
src="<?php echo 'https://www.youtube.com/embed/oLuKopMbl9k'; ?>"
frameborder="0"
allow="accelerometer;
autoplay;
encrypted-media;
gyroscope;
picture-in-picture" allowfullscreen>
</iframe>
How can I hide actual YouTube video URL in codeingiter / PHP from user,
I have hide the "src" attribute value so user no one can directly copy and paste it.
As far as i know, its not possible to hide a URL from user, user will always be able to download the video as long he can watch it in browser
EDIT: forget to mention you can try to use other platforms, but with you tube is not possible to hide as you can click on the logo and open in YouTube

Open all pages in directory in one page

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>

displaying a php file in an iframe using codeigniter

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>

Facebook fanbox with custom CSS

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&amp" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:258px;" allowTransparency="true"></iframe>

Google API - Static Maps

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 ?

Categories