Pretend to supply a cookie?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stephen Oakes

    Pretend to supply a cookie?

    Hi all,
    I am writing a web page which does the following:
    - performs HTTP requests to several specific pages
    - parses the results
    - displays customised versions of the data.

    I use fopen and it is really pretty straightforward , EXCEPT that one of the
    sites does not operate without cookies. So, although I can view the site
    using a browser, I cannot read it using fopen (well, actually I get the page
    that says I need to enable cookies, but I don't get the data I want.)

    Is there any way I can pretend that I have a cookie from PHP?

    --
    Stephen Oakes


  • Matthias Esken

    #2
    Re: Pretend to supply a cookie?

    Stephen Oakes wrote:
    [color=blue]
    > Is there any way I can pretend that I have a cookie from PHP?[/color]

    http://pear.php.net/package/HTTP_Client works fine for me.

    Matthias

    Comment

    • Chung Leong

      #3
      Re: Pretend to supply a cookie?


      "Stephen Oakes" <soakes1@XXXbig pond.net.au> wrote in message
      news:2C%Rc.4385 1$K53.24819@new s-server.bigpond. net.au...[color=blue]
      > Hi all,
      > I am writing a web page which does the following:
      > - performs HTTP requests to several specific pages
      > - parses the results
      > - displays customised versions of the data.
      >
      > I use fopen and it is really pretty straightforward , EXCEPT that one of[/color]
      the[color=blue]
      > sites does not operate without cookies. So, although I can view the site
      > using a browser, I cannot read it using fopen (well, actually I get the[/color]
      page[color=blue]
      > that says I need to enable cookies, but I don't get the data I want.)
      >
      > Is there any way I can pretend that I have a cookie from PHP?
      >
      > --
      > Stephen Oakes
      >[/color]

      Pass a stream context with a cookie to fopen(). See
      http://www.php.net/stream-context-create/.


      Comment

      Working...