I use PHPCrawl for crawl websites but now I want to add a cookie to specific domain, because this domain has a authentication and I want to get information in authorized pages.
How can I add a cookie to specific domain?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Finally I find a way to add cookie to an specific domain:
I going to overload __construct in my own crawler class like this:
Now you should have a cookie with
JSESSIONIDname andDE7BCB89B0D5BB072357450F01415FABfor it’s value.