How to make the headers same using PHP? I want to set the headers same while sending request from cURL. Basically, i am able to access a url by typing in the browser. But while using PHP cURL, am not able to access the page. So, maybe making the headers same can solve this.
Headers while sending actual request:
Request Line: GET /jlp.cgi?Flag=Html_Data&LogType=0&Dummy=1341550112739 HTTP/1.1
Host: <abc>
Proxy-Connection: Keep Alive
Cookie: iR=548729
There is no such field as Connection and Referer in the original request.
All the other fields (User-Agent, Accept, Accept-Language, Accept-Encoding) are same in both requests.
Headers when sending from cURL:
Request Line: GET /curlexp2.php?address=http%3A%2F%2F10.128.58.200%2Fjlp.cgi%3FFlag%3DHtml_Data%26LogType%3D0%26Dummy%3D1341550112739&submit=Log+In HTTP/1.1
Host: localhost
Connection: Keep Alive
Referer: http://localhost/exp2.php
There is no such field as Proxy-Connection and Cookie in this cURL request.
Thanks in advance.