|
-
February 15th, 2007, 09:09 AM
#1
Requesting comment from PHP developers, especially if they directly use hosting..
Hi all
Following the introduction of some fairly restrictive internet controlling on one of the networks i use, I'm considering ways to circumvent it..
I have the ability to create a local proxy that will forward requests to a server-side page, that will fetch the data for me.
In concept it might be similar to http://www.jmarshall.com/tools/cgiproxy/
with the exception that i'd establish persistent connections, and not cook the data - the client app is responsible for using the proxy
I have some questions on this, mainly from a connectivity point of view, and some because i;ve never used php..
I guess you could describe it as a proxy that works like an ftp server, capable of serving all of the internet. One control channel causes the hosted page to fetch internet data and relay it back. The control channel communication and reception of relayed data is handled entirely by the client machine (operating something like a socks proxy, or a tcp-layer rewriting firewall itself)
Has anyone successfully connected out to an external resource, from their php pages? (I.e. your hosting account lets your php pages download data from other sites)
Did you have to buy something specific from the provider to enable this functionality?
Who decides on the persistence of the connections to the page? Will the host kill the control connection after a while?
How much work (in php) would this be?
End of the day, if the hosting package i would need to enable this functionality would be a $10 a month and i can wangle a broadband connection into the office for my own personal use for $12, then i'll buy the broadband, but right now i dont think thats an option and all the paid-for proxy services seem quite pricey ($50+/mo)
-
February 15th, 2007, 10:03 AM
#2
Re: Requesting comment from PHP developers, especially if they directly use hosting..
From what I understand, you want to use a web server (that you are allowed access to) to connect to another web server (that you don't have access to) in order to show the non-accessible pages? If this is the case, you can read pages from other web sites and then just echo the content. You would have to parse the data in order to correct the links and images.
Take a look at the following.
file_get_contents()
fread()
fgets()
In order to parse the data, you might have to dip into regular expressions.
If this does not answer your questions, could you help me to understand better?
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
February 15th, 2007, 11:33 AM
#3
Re: Requesting comment from PHP developers, especially if they directly use hosting..
 Originally Posted by cjard
Hi all
Following the introduction of some fairly restrictive internet controlling on one of the networks i use, I'm considering ways to circumvent it..
I have the ability to create a local proxy that will forward requests to a server-side page, that will fetch the data for me.
In concept it might be similar to http://www.jmarshall.com/tools/cgiproxy/
with the exception that i'd establish persistent connections, and not cook the data - the client app is responsible for using the proxy
I have some questions on this, mainly from a connectivity point of view, and some because i;ve never used php..
I guess you could describe it as a proxy that works like an ftp server, capable of serving all of the internet. One control channel causes the hosted page to fetch internet data and relay it back. The control channel communication and reception of relayed data is handled entirely by the client machine (operating something like a socks proxy, or a tcp-layer rewriting firewall itself)
Has anyone successfully connected out to an external resource, from their php pages? (I.e. your hosting account lets your php pages download data from other sites)
Did you have to buy something specific from the provider to enable this functionality?
Who decides on the persistence of the connections to the page? Will the host kill the control connection after a while?
How much work (in php) would this be?
End of the day, if the hosting package i would need to enable this functionality would be a $10 a month and i can wangle a broadband connection into the office for my own personal use for $12, then i'll buy the broadband, but right now i dont think thats an option and all the paid-for proxy services seem quite pricey ($50+/mo)
At your own risk of course (many companies don't like their employees circumventing their security policies). Creating an open proxy is a very bad idea, this is in effect what you will be doing, at the very least it should be password protected and use SSL.
The safest method however is as follows. If you have a broadband connection, simply install a proxy sever on your home LAN which is accessible only from within the LAN. Then use a protocol such as SSH (with a tunnel - I wrote a tutorial for this), or remote desktop to access the LAN and use the proxy server.
Last edited by visualAd; February 15th, 2007 at 11:44 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|