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

curl-and-php

re: https:// Login and Cookies Being used

From: Justin <curlphp_at_nubin.com>
Date: Mon, 11 Aug 2003 12:27:23 -0400

I figured it out!! yay..
I needed to call
 curl_setopt($ch, CURLOPT_URL, "FIRST URL");
 curl_setopt($ch, CURLOPT_URL, "SECOND URL");

all in the same session! woo!

here's the final script

<?
 set_time_limit(0);
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, https://manage1.sprintpcs.com/Manage?action=doLogin&target=Login&min=&password=);
 curl_setopt($ch, CURLOPT_COOKIEJAR, "my_cookies.txt");
 curl_setopt($ch, CURLOPT_COOKIEFILE, "my_cookies.txt");
 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_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, "my_cookies.txt");
 curl_setopt($ch, CURLOPT_COOKIEFILE, "my_cookies.txt");
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 echo curl_exec($ch);
 curl_close ($ch);
?>

thanks

Justin.

-------------------------------------------------------
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-11