70 users online (0 members and 70 guests)  




  Results 1 to 4 of 4
Digg button stumble

Related

  1. Help with an Auto-responder    Forum: HTML Forum
    Replies: 1
  2. Auto refesh    Forum: CGI Perl Forum
    Replies: 1
  3. Auto-Redirect    Forum: HTML Forum
    Replies: 1
  4. How to auto jump?    Forum: HTML Forum
    Replies: 2
  1. #1
    wankata's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2009
    Posts
    2

    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



  2. #2
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    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']."' />";
    ?>

  3. #3
    wankata's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2009
    Posts
    2

    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.

  4. #4
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    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.



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •