php curl login basic athentication fail -
i have problem login rompage server , if login self , refresh code , code work fine , after logout , refresh again , code doesn't work. think problem cookie or that
before login : login form
after login : request ok
and code :
$snrhandler = curl_init('azin:775533@10.150.25.3/rpdslperfdetail_curr.html?2,3'); curl_setopt ($snrhandler, curlopt_returntransfer, 1); curl_setopt($snrhandler, curlopt_cookiesession, 1); curl_setopt($snrhandler, curlopt_cookiefile, 'cookie.txt'); curl_setopt($snrhandler, curlopt_cookiejar, 'cookie.txt'); curl_setopt($snrhandler, curlopt_encoding, 1); $snrhtml = curl_exec($snrhandler);
Comments
Post a Comment