Page 1 of 1

sending cookie values

Posted: Sat Jan 03, 2004 4:06 am
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

Posted: Sat Jan 03, 2004 11:00 am
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