image_proxy.php 352 B

12345678910111213141516171819
  1. <?php
  2. require "misc/tools.php";
  3. $url = $_REQUEST["url"];
  4. $requested_root_domain = get_root_domain($url);
  5. $allowed_domains = array("pinimg.com", "i.pinimg.com", "pinterest.com");
  6. if (in_array($requested_root_domain, $allowed_domains))
  7. {
  8. $image = $url;
  9. $image_src = request($image);
  10. header("Content-Type: image/png");
  11. echo $image_src;
  12. }
  13. ?>