Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Sep 2009
    Location
    Calgary, Alberta
    Posts
    243
    Thanks
    51
    Thanked 3 Times in 3 Posts

    Read html page to Variables

    I am looking to find out how to open and read a html page into variables..

    can this be done..?

    and how?

    Thanks. Slayer

  • #2
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i'm not quite sur what you are asking for but something like this,

    PHP Code:
    <?php
    $link 
    'http://google.com';
    $handle fopen($link"rb");
    $contents stream_get_contents($handle);
    fclose($handle);
    ?>
    $contents is now the variables

  • #3
    Regular Coder
    Join Date
    Sep 2009
    Location
    Calgary, Alberta
    Posts
    243
    Thanks
    51
    Thanked 3 Times in 3 Posts
    I am looking at reading a local html file.. and displaying certain contents of the file on screen or saving to a DB..

    Thanks,

  • #4
    Regular Coder
    Join Date
    Nov 2007
    Location
    Leeds, UK
    Posts
    514
    Thanks
    24
    Thanked 19 Times in 19 Posts
    Quote Originally Posted by SlayerACC View Post
    I am looking at reading a local html file.. and displaying certain contents of the file on screen or saving to a DB..

    Thanks,
    PHP Code:
    ob_start();
    include(
    "your_file.html");
    $content ob_get_flush(); 
    Working towards a Internet where we don't have website just browser applications Kill the Hyper-link and say hello to 3D Games in the browser :)


  •  

    Posting Permissions

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