build an anonymizer in PHP
| From: | Peter Troll | Date: | Sun, 03 Dec 2000 21:17:45 +0000 |
| Subject: | build an anonymizer in PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-28471@lists.php.net to get a copy of this message | ||
Hi folks,
I am currently building a protype of anonymizer (a proxy for Web contents).
I have set up a simple form which takes the URL, open it with fopen and writes a temporary file.
Once the temporary file is created I parse <A href>, <IMG SRC> tags etc. so that they
look like this:
http://www.somesite.com/index.html becomes
http://www.mysite.com/surf.php3?URL=http://www.somesite.com/index.html
When the file has been scanned I write its contents back to the browser using echo(). URLs are
parsed properly but images do not appear. However by looking at the output text I can see I achieve
the same results as other commercial anonymizers. The problem lies with the way the output (binary
content) is sent back to the browser.
I have also tried sending back the contents as HTML with header(), to no avail.
Does someone has any clues or general information on how to proceed ?
Regards,