hi all,
I am trying to get the search results from an external site (let's say site.com), parse it using regular expressions and insert all records into my database. I am using the http navigator class found on php classes and I am sure this class works because I used it many times.
The problem is this: site.com creates a session when I first visit the site and this session will stick with me for all the pages I visit. This session is storing 3 cookies on my computer:
[ASPSESSIONIDSCSSDBDR] => Array ( [secure] => [value] => KFMKOJDDOIJNENCDLKOAPABD [date_added] => 1107452909 ) [ASPSESSIONIDQCRTCACR] => Array ( [secure] => [value] => PIPKFKDDMAFCGGOEENILPPAO [date_added] => 1107452909 ) [ASPSESSIONIDQARSDACQ] => Array ( [secure] => [value] => KJDLEKDDLHMNOKFALGKFBFFF [date_added] => 1107452912 )
So, in my script I visit the homepage and the search form page to get the cookies and then I try to get the search results page by sending the cookies and posting the form data.
All I get is this:
Warning: Page has Expired
The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.
But if I visit the page normally and then get the cookies from my cookie directory in Mozilla and insert them manually into the script it works. (of course it works for 30 minutes until the session expires)
so, because the session expires and I will have to run the parser daily, I have to get a new session every time and use it.
any help or hint (even tiny one) will be highly appreciated because this is the hardest problem I ever had in my 4-years PHP career 😕
thanks