follow redirect for google search (#231)

This commit is contained in:
Lanshun Zhou 2024-03-17 19:04:32 +08:00 committed by GitHub
parent 54639a4b64
commit e05218e299
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,7 @@
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
// Convert all environment variable keys to lowercase
$envVars = array_change_key_case($_SERVER, CASE_LOWER);
@ -78,4 +79,4 @@
return $imageUrls;
}
?>
?>