[nycphp-talk] PHP Proxy
Tero Tähtinen
tero.tahtinen at kateetti.fi
Fri May 12 01:44:15 EDT 2006
I've built a PHP proxy few years ago also. Are you using the web proxy with
www-client (~Firefox) or are you using it with Curl or some library like
that?
Because after you have configured the web-proxy to web browser it should use
it to all links/images/data files automatically. Have you checked that there
ain't any list of sites that should be connected directly?
Main problem with my proxy-server was ability to reuse socket connection
with following request's from same source. First it would be easiest to add
an extra header to content you send to browser (or Curl) with following
line: "Connection: close" . I recommend that you build somekind of header
parser that can modify received and forwarded headers. For example all kinds
of cache headers could be that way disabled (if so wanted).
If you make header parser it is quite easy to add for example max image
filesizes and conversion from different file formats to another. This way I
can now browse web with my mobilephone because all pictures are converted
and sent much smaller than they appear at websites.
- Tero Tähtinen
-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
Behalf Of Jon Strong
Sent: Friday, May 12, 2006 1:50 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] PHP Proxy
Thank you Nasir, the cgiproxy looks good, but I was wondering if there is a
way to do that with php, I am trying to learn more php and I though this
would be a hard project to do.
Jon Strong
On May 11, 2006, at 4:26 PM, Nasir Zubair wrote:
Hi Jon,
If I understand correctly, you are making a proxy script (kinda like
Anonymizer). If so, you need to process HTML of the page you just processed
and update all the links to go through your script.
You should take a look at CGIProxy <
http://www.jmarshall.com/tools/cgiproxy/>
- Nasir
On 5/11/06, Jon Strong < admin at tallchild.com> wrote:
I am trying to create a proxy server using php, I can view the
webpage with just the text but none of the image or flash are there,
also when you click on a link it just goes to the site. Can someone
point me in the right direction. I am a fairly new php programmer and
this is the hardest project i have done so far.
Jon Strong
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
New York PHP Conference and Expo 2006
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
--
Nasir Zubair
http://www.nasir.us/
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
New York PHP Conference and Expo 2006
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
More information about the talk
mailing list