PHP Proxy Help
Posted: Wed Oct 07, 2009 5:36 am
Hey, I was wondering if someone could help me with a simple PHP proxy that I am making.
The WiP site is here : http://www.2sharp.exofire.net (use http:// in the text box)
Heres the problem:
I have a index.php page where the user enters the site they wish to navigate to using the proxy.
Once they press the main button a process.php document is ran. This file echo's out the contents of the site, and the website works fine. However when a user goes to navigate by clicking a link on the page they get directed to something like this:
http://2sharp.exofire.net/watch?v=VPKyc ... re=popular
which doesnt work due to the URL.
I was wondering if there was a way to catch this URL before the page redirects and crashes, convert it to 'youtube.com' instead of '2sharp.exofire.net' and then run it back through the process.php file.
Hence echoing out the desired page through proxy.
Thankyou for reading, any help would be much appreciated as I am trying to learn.
The WiP site is here : http://www.2sharp.exofire.net (use http:// in the text box)
Heres the problem:
I have a index.php page where the user enters the site they wish to navigate to using the proxy.
Once they press the main button a process.php document is ran. This file echo's out the contents of the site, and the website works fine. However when a user goes to navigate by clicking a link on the page they get directed to something like this:
http://2sharp.exofire.net/watch?v=VPKyc ... re=popular
which doesnt work due to the URL.
I was wondering if there was a way to catch this URL before the page redirects and crashes, convert it to 'youtube.com' instead of '2sharp.exofire.net' and then run it back through the process.php file.
Hence echoing out the desired page through proxy.
Thankyou for reading, any help would be much appreciated as I am trying to learn.