Page 1 of 2
POST request
Posted: Tue Jan 24, 2006 3:16 am
by jurriemcflurrie
We have an secured internet connection at the business i work, so we can't request pr0n etc.
Now I'ts not that I'm a pervert or something

but I want to get round that security.
And I did. I made a prefetch script and uploaded it to an allowed server. The script changes all links, images, etc to the prefetch script so those are displayed also.
Problem is those post forms. Is there a way to send a post request via php?
Thanks in advance!
Posted: Tue Jan 24, 2006 4:32 am
by Jenk
Not sure if this is a taboo subject or not.. but my guess would be cURL.
Posted: Tue Jan 24, 2006 5:02 am
by jurriemcflurrie
Thanks for the reply. I have no control over the sever wich the files are on, and curl is not supported

Any other adeas?
But why would it be a taboo subject? It's not that I actually gonna use it

I just want to see if I can do it. Tons of pr0n at home so no need for here at work

I heard that my boss spend a whole lot of money on the system that blocks unwanted pages. So I thought let's see what I can do. In 2 minutes I got around the system so I'm curious what the possabilities exactly are. Just for fun

Posted: Tue Jan 24, 2006 8:32 am
by feyd
fsockopen() is the old fashioned way.
Posted: Tue Jan 24, 2006 8:35 am
by Jenk
I just thought that bypassing security measures might be looked upon as taboo, but I suppose it's the use that is taboo, not the application itself.. just like guns

Posted: Tue Jan 24, 2006 11:38 am
by zeveck
Using fsockopen() looks like overkill.
I mean, doing a redirect is easy, and can include GET data since that is in the URL.
Is there a similarly easy way to redirect to a given URL with programmatically appended POST data?
Or, barring that, simple directions on how to use fsockopen() to do a POST rather than the generic link of using it to literally open a socket, build the statement manually, etc.??
Posted: Tue Jan 24, 2006 11:43 am
by Chris Corbyn
zeveck wrote:Using fsockopen() looks like overkill.
I mean, doing a redirect is easy, and can include GET data since that is in the URL.
Is there a similarly easy way to redirect to a given URL with programmatically appended POST data?
Or, barring that, simple directions on how to use fsockopen() to do a POST rather than the generic link of using it to literally open a socket, build the statement manually, etc.??
Sending POST with fsockopen isn't hard really. HTTP headers are very very simple

cURL makes it easier granted. POST is not URL based so it cannot be done via URL no

Posted: Tue Jan 24, 2006 2:33 pm
by Ambush Commander
Set up a proxy server!
Posted: Tue Jan 24, 2006 6:38 pm
by zeveck
wha?
Posted: Tue Jan 24, 2006 6:41 pm
by Ambush Commander
I assume they're doing filtering on a site blacklist basis. These connections have to go through the network, so they can be bypassed. However, a proxy server allows you to connect to only one IP: the IP of the proxy server, which then makes connections to the blocked IPs without restriction. It's sorta like those open proxies you can find on the web, only it's faster and more secure.
Posted: Tue Jan 24, 2006 10:14 pm
by zeveck
Ah. I thought you were commenting on the PHP POST issue as opposed to the avoiding work filters issue.
Posted: Wed Jan 25, 2006 6:49 am
by timvw
You may want to search for a tunnel... Nowadays there are tunnels over http, dns, ... This way you're not limited to surfing only...
Posted: Fri Feb 03, 2006 6:24 am
by jurriemcflurrie
No I just want to do it with php... Next week I'll have a look at it again. It's almost weekend!!

Thanks for all the replies!
Posted: Fri Feb 03, 2006 6:58 am
by raghavan20
you have to download these following classes which would help you make POST and GET messages.
PEAR class
URL class
Socket class
Request class
basically you would have to use Request class and you have to include this in your script file and the other files will be included in Request.php. If you see the Request.php file , you will see include paths and make sure you put the other files in the directories as specified in Request.php include statements...
example usage:
Code: Select all
include('../Request.php');
$req = &new HTTP_Request("http://somehost.com/login.php");
$req->addPostData("txtUserName", "username", false);
$req->addPostData("txtPassword", "password", false);
$req->addPostData("subAuthentication", "submit", false);
$req->sendRequest(true);
print_r($req->getResponseHeader());
print_r($req->getResponseCookies());
echo $req->getResponseBody();
Posted: Fri Feb 03, 2006 9:32 am
by zeveck
Download from where? Are these standard parts of PHP? I mean, I know PEAR is, but what of the others?