Reading a url while keeping the session alive?

Discussion in 'PHP' started by mahmood, Dec 26, 2005.

  1. #1
    Hi

    Sometimes ago I asked how I can read contents of a web page while keep the session alive and gurus here suggested using curl function. at first I had problems with PHP 5, then I uploaded a file to the server - where PHP4 installed - and tried the code.

    I still havent managed to do that and I have changed the code so many times that I don't remember what I have done.

    Now my question is that how I can read the contentes of this page - for example - the same as I see it now.


    .
     
    mahmood, Dec 26, 2005 IP
  2. MaxPowers

    MaxPowers Well-Known Member

    Messages:
    264
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    120
    #2
    <? session_start();
    include('http://www.domain.com/yourpage.html');
    ?>
     
    MaxPowers, Dec 28, 2005 IP
  3. n0other

    n0other Peon

    Messages:
    146
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    1. Curl. It's faster than everything else.
    2. fopen. url_fopen must be set to 1 in php.ini
    3. include / require or their derivatives combined with PHP's built-in output buffering functions.
     
    n0other, Dec 28, 2005 IP