passing a request through a proxy.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Daisy Cutter
Forum Commoner
Posts: 75
Joined: Sun Aug 01, 2004 9:51 am

passing a request through a proxy.

Post by Daisy Cutter »

I want to prove to my networking teacher that the websense proxy DOESNT work. I've got a bet with him that if I win I get an A for the term.

I tried using a proxy, but once I found a proxy site that worked I realized that we already have proxies set up and I cant chain them right.

Then I got an idea. I could do something like this:

Code: Select all

<?php
header("Location: $_POST['URL']");
exit;
?>
but send that through a proxy. could anyone tell me how?

Then just http://example.com/go.php?url=http://ex ... ontent.htm would do it.

Heh. I'll teach that old coot a lesson :wink: .
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

ignoring the parse error in your code, that's a redirect.. not a proxy.
Daisy Cutter
Forum Commoner
Posts: 75
Joined: Sun Aug 01, 2004 9:51 am

Post by Daisy Cutter »

I know.

Is there a way to make the server get it through a proxy and output the page?
bling
Forum Commoner
Posts: 25
Joined: Mon Jul 12, 2004 12:44 pm

Post by bling »

Has anybody ever thought of a proxy-proxy server? It doesn't have too many real world applications unless you work for a large corporation. Basically you would have a proxy server that uses a proxy server.

Let take a corp that has one central proxy server. Now if each sattelite office had a proxy that was a middlepoint between the corporate office and the end user, this could take a considerable load off of the corporate office's proxy. However for the corporate office to check out who is accessing what, they would have to check the logs of the individual offices proxy.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you can use [php_man]curl[/php_man], [php_man]file_get_contents[/php_man], and the other file url wrappered functions to create your own proxy of sorts.
Post Reply