Pretend to supply a cookie?

This is a discussion on Pretend to supply a cookie? within the PHP Language forums, part of the PHP Programming Forums category; Hi all, I am writing a web page which does the following: - performs HTTP requests to several specific pages - parses ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-10-2004
Stephen Oakes
 
Posts: n/a
Default 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


Reply With Quote
  #2 (permalink)  
Old 08-10-2004
Matthias Esken
 
Posts: n/a
Default Re: Pretend to supply a cookie?

Stephen Oakes wrote:

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


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

Matthias
Reply With Quote
  #3 (permalink)  
Old 08-11-2004
Chung Leong
 
Posts: n/a
Default Re: Pretend to supply a cookie?


"Stephen Oakes" <soakes1@XXXbigpond.net.au> wrote in message
news:2C%Rc.43851$K53.24819@news-server.bigpond.net.au...
> 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
>


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


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:07 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0