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
cURL login problem for a licensed webpage [message #175547] Thu, 06 October 2011 12:23 Go to previous message
tokiyashi is currently offline  tokiyashi
Messages: 2
Registered: October 2011
Karma:
Junior Member
Hey guys, i'm writing a simple code piece to create a little
application for our university and i need to login our university's
data management system.
I wrote code below there, i don't know what is going wrong. login.aspx
page includes the login form. dashboard.aspx is what i want to get.


$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_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_exec($ch);

curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_URL, 'http://bys.marmara.edu.tr/
dashboard.aspx');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$page = curl_exec($ch);
echo $page;


with best regards,

Çağlar Bozkurt / tokiyashi
[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: Sat Nov 09 23:46:15 GMT 2024

Total time taken to generate the page: 0.04795 seconds