cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: https:// Login and Cookies Being used

From: Toan Pham <aznblood_at_rugking.com>
Date: Fri, 15 Aug 2003 16:18:15 -0400

Hi, i copied Justin's code but it didn't work, it got an error reading certificate file.
here is the code. Justin, if you there, please tell me how to login sprintpcs and read the minutes remaining. thanks

The source code copied from Justin.
<?
 set_time_limit(0);
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, "https://manage1.sprintpcs.com/Manage?action=doLogin&target=Login&min=nmnumber&password=mypassword);
 curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/my_cookies.txt");
 curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/my_cookies.txt");
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
 curl_setopt($ch, CURLOPT_HEADER, 1);
  curl_setopt($ch,CURLOPT_SSLCERT,0);
 curl_setopt($ch,CURLOPT_SSLCERT_PASSWORD,0);
 curl_setopt($ch, CURLOPT_VERBOSE, 1);
 curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, "https://manage1.sprintpcs.com/Manage?layer=1&target=MyPlan&action=doMyPlanCurrentUsage");
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
 curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
 curl_setopt($ch, CURLOPT_FAILONERROR, 1);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
 curl_setopt($ch, CURLOPT_COOKIEJAR, "/home/aznblood/my_cookies.txt");
 curl_setopt($ch, CURLOPT_COOKIEFILE, "/home/aznblood/my_cookies.txt");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 echo curl_exec($ch);
 curl_close ($ch);
?>

the error that i got is:

* About to connect() to manage1.sprintpcs.com:443
* Connected to manage1.sprintpcs.com (65.174.43.18) port 443
* unable to set certificate file (wrong password?)* Closing connection #0
Content-type: text/html
X-Powered-By: PHP/4.3.1

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-17