logging into server - getting data (HTTPS protection)

Hi guys,

i am new to PHP and a bit old to programming. I am trying to make a script that can loggin and pass via HTTPS get a page and return this page to a string. I have made somework but nothing is complete yet. My real problem is an error() that appear and dont know what to do. There is no error number its just an error and a message to contat with system admin. My code is the following:

<?php
        $access = curl_init();
        curl_setopt($access, CURLOPT_URL, "https://cronos.cc.uoi.gr/unistudent/login.asp");
        curl_setopt($access, CURLOPT_HEADER, false);
        curl_setopt($access, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($access, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($access, CURLOPT_POST, true);
        curl_setopt($access, CURLOPT_POSTFIELDS, 'userName=xxxx&pwd=xxxx&submit1=%C5%DF%F3%EF%E4%EF%F2&loginTrue=login');
        curl_setopt($access, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($access, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:12.0) Gecko/20100101 Firefox/12.0");
        curl_setopt($access, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($access, CURLOPT_AUTOREFERER, "https://cronos.cc.uoi.gr/unistudent/login.asp");
        $httppage = curl_exec($access);
        echo $httppage;
        curl_close($access);
?>

What’s the error message?

It was a general error message that i couldnt connect “Please contact with admin.”.

Nevermind i solved it!

Sponsor our Newsletter | Privacy Policy | Terms of Service