Posted By

devnull69 on 01/06/12


Tagged

proxy


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Some0ne
jbyerson


Simple PHP proxy


 / Published in: PHP
 

Simple PHP proxy. Call it with http://your.url/proxy.php?url=http%3A%2F%2Fthe.external.url/whatever.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  

You need to login to post a comment.