I have a big problem. I can't manage to find a solution. Data is submitted through a form via GET. The results are then reloaded via AJAX. I have tried every way possible via cURL. The server even throws SQL error messages. But unfortunately, I can't get it to work. Can anyone help me?
#{
# "searchdata": {
# "required": "1",
# "statistics": "1",
# "offer_name": null,
# "zip": "01069",
# "location": null,
# "maxdistance": "5",
# "target_group": null,
# "age_group": null,
# "language": null,
# "sort": "zip_asc",
# "record_offset": 0
# }
#}
#Test-URL = https://pflegefinder.bkk-dachverband.de/aua/searchresult.php?searchdata%5Brequired%5D=1&searchdata%5Bstatistics%5D=1&searchdata%5Boffer_name%5D=&searchdata%5Bzip%5D=01069&searchdata%5Blocation%5D=&searchdata%5Bmaxdistance%5D=5&searchdata%5Btarget_group%5D=&searchdata%5Bage_group%5D=&searchdata%5Blanguage%5D=&searchdata%5Bsort%5D=zip_asc&searchdata%5Brecord_offset%5D=0
$data = array("required" => "1","statistics"=>"1","offer_name" => null,"zip" => "51143","location" => null,"maxdistance" => "20","target_group" => null,"age_group" => null,"language" => null, "sort" => "zip_asc", "record_offset" => 0);
$data_string = urlencode(json_encode($data));
$url = "https://pflegefinder.bkk-dachverband.de/aua/rest_searchresult.php?".date("U");
$ch = curl_init();
// set post fields
curl_setopt($ch, CURLOPT_URL, ($url));
# curl_setopt($ch, CURLOPT_HTTPHEADER, array('Cookie: MK_CookieConsent={"required":true,"statistics":true},PHPSESSID="6ldq1ffekjeum41gr3b4bp5tqm"'));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
#curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
#curl_setopt($ch, CURLOPT_POSTFIELDS,'searchdata[required]=1&searchdata[statistics]=1&searchdata[offer_name]=&searchdata[zip]=01069&searchdata[location]=&searchdata[maxdistance]=5&searchdata[target_group]=&searchdata[age_group]=&searchdata[language]=&searchdata[sort]=distance_asc&searchdata[record_offset]=0');
curl_setopt($ch, CURLOPT_POSTFIELDS,array("searchdata"=>$data_string));
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Googlebot/2.1 (+http://www.google.com/bot.html)');
curl_setopt($ch, CURLOPT_REFERER, 'https://pflegefinder.bkk-dachverband.de/aua/searchresult.php?searchdata%5Brequired%5D=1&searchdata%5Bstatistics%5D=1&searchdata%5Boffer_name%5D=&searchdata%5Bzip%5D=51143&searchdata%5Blocation%5D=&searchdata%5Bmaxdistance%5D=5&searchdata%5Btarget_group%5D=&searchdata%5Bage_group%5D=&searchdata%5Blanguage%5D=&searchdata%5Bsort%5D=distance_asc&searchdata%5Brecord_offset%5D=0');
# curl_setopt($ch, CURLOPT_REFERER, 'https://pflegefinder.bkk-dachverband.de/aua/');
curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_VERBOSE, '0');
curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiefile2.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefile2.txt");
curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());
$seite = curl_exec($ch);
curl_close($ch);
languageaslaguageand that's causing the SQL errors.