Jump to content

curl help needed.


heminfotech

Recommended Posts

Hi

 

Sorry for that

 

 

$url = "http://tempo.sandicor.com/Login/Login.aspx?ReturnUrl=%2fRoster%2fScripts%2fMember.asp%3fPubID%3d2323&PubID=2323";
$vars = "UserLogin_txtLoginUsername=$user&UserLogin_txtPassword =$password";

$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_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
// if ($method == 'POST') {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);
// }
$data = curl_exec($ch);
curl_close($ch);

 

 

it gives out put as

 

 

 

 

HTTP/1.1 200 OK Date: Fri, 06 Apr 2007 08:53:56 GMT Server: Microsoft-IIS/6.0 MicrosoftOfficeWebServer: 5.0_Pub X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: no-cache, no-store Pragma: no-cache Expires: -1 Content-Type: text/html; charset=utf-8 Content-Length: 10838

 

 

Followed by the login page

 

I am new to CURL & I want to know what exactly this messages means & what will be the problems here

 

Thanks for YOUR Support

 

Thanks & Regards

heminfotech

 

 

Link to comment
https://forums.phpfreaks.com/topic/45844-curl-help-needed/#findComment-222780
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.