I am trying to scrap event lists data from festivalnet. Which can only be retrieved after login. I try it in PHP using Curl. But Not able to login in festivalnet page, I am Posting parameters with curl.
//username and password of account
$login_username = 'abcd';
$password = 'xxxx';
//login form action url
$form_url="https://festivalnet.com/cgi-bin/festbiz2/db.cgi";
$postinfo = "userid=".$login_username."&pw=".$password.'&db=festbiz&login=1';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $form_url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postinfo);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo curl_exec($ch);
It redirect to https://festivalnet.com/cgi-bin/festbiz2/db.cgi?db=festbiz&login=3&return_to=%2Ffno%2Findex.php%3Fmode%3Dcp
Please help.