Skip to content
Snippets Groups Projects
Verified Commit 1e8ed63c authored by Jonas Leder's avatar Jonas Leder
Browse files

return error if ebay returns other than 200

parent ce30653d
Branches
No related tags found
No related merge requests found
Pipeline #2171 passed
...@@ -11,6 +11,12 @@ curl_setopt ($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); ...@@ -11,6 +11,12 @@ curl_setopt ($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
$content = curl_exec($curl); $content = curl_exec($curl);
$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($httpcode == 200) {
$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE); $contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
header('Content-Type: ' . $contentType); header('Content-Type: ' . $contentType);
echo ($content); echo ($content);
} else {
die("Page not Found.");
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment