Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating an online proxy. Help with masking your IP?

Status
Not open for further replies.

748323

Programmer
Dec 10, 2004
70
US
Well, I've created a very basic online proxy. I'm having trouble setting up the proxy. This is what I have so far:

Code:
<?

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $_POST['url']);
if ($_POST['cookies'] != "") {
	curl_setopt($curl, CURLOPT_COOKIE, $_POST['cookies']);
}
if ($_POST['referer'] != "") {
	curl_setopt($curl, CURLOPT_REFERER, $_POST['referer']);
}
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 
$return = curl_exec($curl);
curl_close($curl);

echo $return;

?>

I tried adding two options:
curl_setopt($curl, CURLOPT_PROXY, "IP here");
curl_setopt($curl, CURLOPT_PROXYPORT, "PORT here");

It didn't work, though. What am I doing wrong? Thanks!
 
If you describe how it fails, what does not work, we'd know a bit more to be able to help. Please elaborate.
If you are interested in IP spoofing, this is the wrong place to ask for help.
 
Nothing shows up. Why is this the wrong place to do it? Its not illegal, is it? Its just for security.
 
What is your level of error checking set to?
What does curl_error() say?

P.S> IP masking is fine, keeping your IP private is understandable. Spoofing would be pretending to be someone else.
 
I figured it out.

I have a question:

What I did, was make a script on my server that uses my cookies to communicate with a separate forum. I used cURL to log in as me, and change my forum signature to anything the user wanted.

If the admin looks at the logs of my username, he will notice hundreds of IPs listed, because of the users who changed my signature.

So, is it legal for me to go to go to a site with proxy lists, grab one of those, and use that instead? I'm not really 'spoofing' the user's IP address. Its just to protect my account from having so many IP's on it =/. Thanks.
 
ALl of this depends on the jurisdiction you or the site falls under. You might want to consult with someone who knows about the applicable laws - I'd rather not trust what someone in a technical forum says in terms of law. Therefore, I'll shut up right now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top