proxy.php 447 B

12345678910111213141516
  1. <?php
  2. require_once("../config.php");
  3. $url = htmlspecialchars($_GET["url"]);
  4. $ext = explode(".", $url);
  5. $ext = $ext[array_key_last($ext)];
  6. if ($ext == "jpg") $ext = "jpeg";
  7. header("Content-type: image/".$ext);
  8. $ch = curl_init();
  9. curl_setopt($ch, CURLOPT_URL, "https://".$url);
  10. curl_setopt($ch, CURLOPT_REFERER, "https://www.pixiv.net/");
  11. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  12. curl_exec($ch);
  13. curl_close($ch);
  14. ?>