Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fopen a site which need cookie

Status
Not open for further replies.

yiutin03

MIS
Joined
May 15, 2003
Messages
76
Location
HK
May I know how can I fopen a website and send the cookie information to the website to do authentication?

e.g. I have the cookie in IE already.
 
fwrites is the function you need

Bastien

Cat, the other other white meat
 
Why don't you use cURL functions (if you have them compiled)?
These functions offer CURLOPT_COOKIE where the data will be sent automatically. Then there will be no need to write your own code.

If you don't have cURL then I recommend using fsock() rather than fopen() for compatibility reasons if you have to migrate to another host. Not all hosts have all file wrappers or even URL wrappers enabled for fopen().
 
thx! all of your,
I will try with your suggestion!

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top