If I curl a forum, I can’t detect whether anything is new because I’m not logged in.
The big Q: How do I compose a curl request that logs me into the site I’ve addressed and then returns the HTML for the page??
I assume that most sites, like this one use a cookie to identify you. How do you have curl invoke the right one?
Hi Adam, I posted some where how to do this, will try and dig it out…
google cookies curl hunte I think will find it.
But basically you have to use a cookies.txt file with curl.
edit
here is the original post
http://forums.macosxhints.com/showthread.php?t=60241
Posts #9 and 13 although I think 13 was just an update on a emailing part of the script.
I have not used or tested this in a long while, but the principles should still work.
Hi Adam,
I just wondered if this was of any use ?
Of course, Mark;
I haven’t worked it into the site I want to test yet, but it’s the framework I needed. I’ve been hacking away at another problem.
Mark; How did you find the appropriate cookie to move to your cookie folder?
I assume you logged in with camino.
If you go to:
/Users/Username/Library/Application Support/Camino/cookies.txt
That should be the one.
I found several (a while ago) wasn’t sure which of them was the one I wanted, so I recorded the entire transaction (IPNetMonitor) and discovered the one doing the talking. Thanks.