0

i have problem with login to Rompage Server , if i login my self and then refresh my code , the code will work fine , but after logout and refresh again , my code doesn't work. i think my problem is with cookie or something like that

Before Login : Login Form

After Login : request OK

and my 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);
nO_sPeaK
  • 25
  • 7
  • Possible duplicate of [How do I make a request using HTTP basic authentication with PHP curl?](http://stackoverflow.com/questions/2140419/how-do-i-make-a-request-using-http-basic-authentication-with-php-curl) – Jamie Bicknell Jun 29 '16 at 09:33
  • nope thats not solved my problem , i got this error HTTP/1.1 400 Bad Request Content-Length: 0 Server: Allegro-Software-RomPager/4.30b3 Connection: close HTTP/1.1 400 Bad Request Content-Length: 0 Server: Allegro-Software-RomPager/4.30b3 Connection: close – nO_sPeaK Jun 29 '16 at 09:47
  • try adding User Agent – Ngô Văn Thao Jun 29 '16 at 10:33
  • still no result , even with user agent – nO_sPeaK Jun 29 '16 at 15:21

0 Answers0