2021-11-10 08:02:56 +01:00
|
|
|
<?php
|
2022-02-04 08:18:03 +01:00
|
|
|
if (!array_key_exists("url", $_GET) || $_GET["url"] == "") {
|
2022-02-03 10:25:55 +01:00
|
|
|
die("URL not set or empty");
|
|
|
|
}
|
|
|
|
|
2021-11-10 08:02:56 +01:00
|
|
|
$curl = curl_init();
|
|
|
|
curl_setopt($curl, CURLOPT_URL, "https://i.ebayimg.com/" . $_GET["url"]);
|
2022-02-04 08:18:03 +01:00
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
|
|
|
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 20);
|
|
|
|
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
|
|
|
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
|
2021-11-10 08:02:56 +01:00
|
|
|
|
2022-02-04 08:18:03 +01:00
|
|
|
$content = curl_exec($curl);
|
|
|
|
$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
|
|
|
|
|
|
|
if ($httpcode == 200) {
|
|
|
|
$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
|
|
|
|
header('Content-Type: ' . $contentType);
|
|
|
|
echo ($content);
|
|
|
|
} else {
|
|
|
|
die("Page not Found.");
|
|
|
|
}
|