Jump to content

Curl & SSL in harmony


kiss-o-matic

Recommended Posts

Hate to ask such a general question, but can't figure out what I'm doing wrong.

Here's the general gist of my attempt.

[code]
// login to Yahoo
$url = "https://login.yahoo.com/config/login_verify2?.done=http://auctions.yahoo.com&.src=auc&.intl=us"
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1)
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2 );
curl_setopt($ch, CURLOPT_TIMEOUT, 5)';
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
$data = curl_exec ($ch);
print $data;
[/code]

It just times out, and tells me:
Warning: curl_error(): 7 is not a valid cURL handle resource in

Am I missing something?

EDIT: Fixed typos in subject & body
Link to comment
https://forums.phpfreaks.com/topic/28839-curl-ssl-in-harmony/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.