3

i have been trying to scrape a website which requires login. Login in POST Request, I have done it successfully. But the links after logged in doesn't gets scraped. It Says " Session Expired" when scraped in curl PHP. I don't know what happens there. Please let me know and solve the problem if possible.

I had scraped many websites but this is little bit different in strategy.

url:http://www.example.com/login --> Required post request with username and password as parameters. Now the problem comes!

Thanks in advance

abdul riyaz
  • 80
  • 1
  • 1
  • 10

1 Answers1

7

You should accept the session cookie, store it, and resend it on the next request.

Keeping session alive with Curl and PHP

Community
  • 1
  • 1
Viktor Koncsek
  • 564
  • 3
  • 13