"...Remember being a youngster, mom or dad telling you "close the door"? Well the same applies to HTML ...."

Go Back   Webmaster Forums > Code Forum > PHP Forum

Reply
 
Thread Tools Rate this Webmaster Discussion
Old 09-23-2009, 12:26 AM   #1
wankata
New Member
 
Join Date: Sep 2009
Webmaster Discussions: 2
Rep Power: 6
wankata is on a distinguished road
Talking Auto iframe php?

Hello friends anyone knows a how to do auto iframe from php script?

Ex:

http://myhost/page.php?url=http://samplepage.html

Creates another page that puts the samplepage.html in an iframe inside the new page. Its much easier to put it on automatic than manually doing. Please help


wankata is offline   Reply With Quote
Old 09-24-2009, 11:09 AM   #2
jthayne
 
jthayne's Avatar
 
Join Date: Aug 2008
Location: Texas
Webmaster Discussions: 501
Rep Power: 21
jthayne is the hardest working person in the biz.jthayne is the hardest working person in the biz.jthayne is the hardest working person in the biz.jthayne is the hardest working person in the biz.
Re: Auto iframe php?

Quote:
Originally Posted by wankata View Post
Hello friends anyone knows a how to do auto iframe from php script?

Ex:

http://myhost/page.php?url=http://samplepage.html

Creates another page that puts the samplepage.html in an iframe inside the new page. Its much easier to put it on automatic than manually doing. Please help
To use your example, the PHP code to show the iframe would be the following:
PHP Code:
<?php
echo "<iframe src='".$_GET['url']."' />";
?>
__________________
Be sure to click the reputation icon to give rep to the person who helped you.
For web design/development services, check Silentium Designs.
jthayne is offline   Reply With Quote
Old 09-29-2009, 08:44 AM   #3
wankata
New Member
 
Join Date: Sep 2009
Webmaster Discussions: 2
Rep Power: 6
wankata is on a distinguished road
Unhappy Re: Auto iframe php?

Thanks sir for the reply. To be truthful I'm a complete noob with this work. Can you help me by giving me a sample page. And also the other pages that I need to make that type of work.
wankata is offline   Reply With Quote
Old 09-30-2009, 09:15 AM   #4
jthayne
 
jthayne's Avatar
 
Join Date: Aug 2008
Location: Texas
Webmaster Discussions: 501
Rep Power: 21
jthayne is the hardest working person in the biz.jthayne is the hardest working person in the biz.jthayne is the hardest working person in the biz.jthayne is the hardest working person in the biz.
Re: Auto iframe php?

You need three total pages -- linkpage.php, iframe.php, and samplepage.html.

In linkpage.html, you will include the following link somewhere on the page:
HTML Code:
<a href='iframe.php?url=samplepage.html'>Click Here</a>
When clicked on, the link will open iframe.php. Where you want the iframe to display, you will place the following code:
PHP Code:
<?php
echo "<iframe src='http://".$_GET['url']."' />";
?>
This will call the url referenced in the address.
__________________
Be sure to click the reputation icon to give rep to the person who helped you.
For web design/development services, check Silentium Designs.
jthayne is offline   Reply With Quote
Reply

Bookmarks

Tags
iframe, php

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Webmaster Discussions
Thread Webmaster Discussion Starter Forum Replies Last Post
Help with an Auto-responder csxkiddman HTML Forum 1 10-18-2008 08:00 PM
Auto refesh davidmook CGI Perl Forum 1 06-10-2006 02:03 PM
Auto-Redirect Sandi3d HTML Forum 1 04-19-2004 11:15 PM
How to auto jump? xav HTML Forum 2 02-26-2001 02:08 AM


All times are GMT -5. The time now is 08:59 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.