http://www.perlmonks.org?node_id=929491


in reply to Re^2: Fetching URL
in thread Fetching URL

You will need to send exactly the same information that your browser sends. Find out what the browser sends, for example using the Mozilla Live Headers extension or using Wireshark, and then replicate that data from your script.

Replies are listed 'Best First'.
Re^4: Fetching URL
by Shaveta_Chawla (Sexton) on Oct 04, 2011 at 10:28 UTC
    Actually the Content length, content header and cookies all the values changes with every request.. I am not able to generate the same header information. Can you guide me on this.

      Extract the cookies from the previous request, and generate the content header and content length headers. Also see WWW::Mechanize, which has solved these problems.

        But this is what the problem is... The cookie information also changes with every request. The code on which i am working is like all the pages are dependent on first page. so the cookie information is same for all the request according to my code. but i need to generate different cookie information with every request which should be same as the source is generating.