FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » cURL login problem for a licensed webpage
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: cURL login problem for a licensed webpage [message #175548 is a reply to message #175547] Thu, 06 October 2011 12:37 Go to previous messageGo to previous message
tokiyashi is currently offline  tokiyashi
Messages: 2
Registered: October 2011
Karma:
Junior Member
I added license too, but still not working.


$url = "https://bys.marmara.edu.tr/login.aspx";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch,
CURLOPT_POSTFIELDS,'txtLogin='.urlencode($username).'&txtPassword='.url encode($password));
//curl_setopt($ch, CURLOPT_POSTFIELDS,'txtLogin='.
$username.'&txtPassword='.$password);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CAINFO, "./bys-license.crt");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_COOKIEJAR, "my_cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "my_cookies.txt");
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows
NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_exec($ch);
curl_close($ch);

$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_URL, 'http://bys.marmara.edu.tr/
dashboard.aspx');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: hai
Next Topic: Need Jr PHP Developers
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Sep 19 22:30:45 GMT 2024

Total time taken to generate the page: 0.03332 seconds