sending cookie values

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mgubco
Forum Newbie
Posts: 1
Joined: Sat Jan 03, 2004 4:06 am

sending cookie values

Post by mgubco »

Hi PHPers,
I have a problem. I'm trying to open a web page with fopen() function. However the web page requires some authentification which is normaly done with cookies stored on my computer so my script ends up on a different web page saying that I didnt authenticate.
So I need to request the url with some cookies but I dont know the correct form. Perhaps the function header() would help. Does anybody have some experience with that?

Thanks a lot.
MGubco
evilMind
Forum Contributor
Posts: 145
Joined: Fri Sep 19, 2003 10:09 am
Location: Earth

Post by evilMind »

Try using [php_man]curl[/php_man]
More specifically [php_man]curl_init[/php_man] and [php_man]curl_setopt[/php_man] and [php_man]curl_exec[/php_man]

Bascially you can setup "cookie information" then use that to send to the host for "verification".

Cookie Information:
http://wp.netscape.com/newsref/std/cookie_spec.html
Post Reply