Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^5: Fetching URL

by Corion (Pope)
on Oct 04, 2011 at 11:35 UTC ( #929520=note: print w/replies, xml ) Need Help??


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

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.

Replies are listed 'Best First'.
Re^6: Fetching URL
by Shaveta_Chawla (Sexton) on Oct 04, 2011 at 12:29 UTC
    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.

      Then, again, you will need to work out what your browser sends if you navigate the website, and, again, replicate what the browser sends from your script. For example, if you want to simulate "open page 1 in one tab", and then "open all linked pages in other tabs, from page 1", the ->back() method of WWW::Mechanize could be of help.

      Again, you have not told me why WWW::Mechanize is insufficient. Please read the documentation and use it or tell us why WWW::Mechanize is insusfficient for your needs.

        Can you help me with the code how to generate header information as i am not able to do that.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://929520]
help
Chatterbox?
[ambrus]: yes, I probably just didn't see you two years ago, because I'm not in perlmonks much
[virtualsue]: Nor am I :-)
[talexb]: virtualsue Heh .. long time no see! :)
[virtualsue]: I have a quiet Perl themed slack workspace
[virtualsue]: The person who talks to me on it the most *hates* Perl but she hates everything
[virtualsue]: If anyone is interested, ping me an email address for an invitation.
[virtualsue]: I welcome any talktaive people who do not mind using a propietary walled-garden service for free
[virtualsue]: or even proprietary
[virtualsue]: we talk about programming and music and stuff

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2017-09-26 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (295 votes). Check out past polls.

    Notices?