Simple PHP proxy


/ Published in: PHP
Save to your folder(s)

Simple PHP proxy. Call it with http://your.url/proxy.php?url=http%3A%2F%2Fthe.external.url/whatever.html


Copy this code and paste it in your HTML
  1. <?php
  2. $url = $_GET["url"];
  3.  
  4. $fp = fopen($url, "rb");
  5. $pagedata = "";
  6.  
  7. while(!feof($fp)) {
  8. $pagedata .= fgets($fp, 4096);
  9. }
  10. fclose($fp);
  11.  
  12. echo $pagedata;
  13. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.