throw error if url is not set or empty

This commit is contained in:
Jonas Leder 2022-02-03 10:25:55 +01:00
parent 0eb8e4d22d
commit ce30653d3b
No known key found for this signature in database
GPG key ID: CC3C488E27DFF5CA

View file

@ -1,4 +1,8 @@
<?php
if(!array_key_exists("url", $_GET) || $_GET["url"] == "") {
die("URL not set or empty");
}
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://i.ebayimg.com/" . $_GET["url"]);
curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);