...

View Full Version : auto submitting to a form using CURL



leowald
10-28-2007, 11:51 AM
Hi,
I am using CURL to auto submit to a form using POST.
I need to submit though using the user's ip address and not the
server's ip address. Is there a way that I can pass through the user's ip address so it will look like they submitted the form?

Thanks a lot,

Leora

mic2100
10-29-2007, 10:50 AM
hi,

you will need to use


echo $_SERVER['REMOTE_ADDR']; //this will get the remote address i.e. users ip


hopefully this will work for you.

leowald
10-29-2007, 02:06 PM
Hi, thanks for your response,

My question though has to do with how do I pass the user ip address to curl. I know that I can get it the user ip but how to pass it on is my question.

Thanks,
Leora

CFMaBiSmAd
10-29-2007, 02:34 PM
The IP address that the receiving server sees, comes from the TCP/IP data packet. There is basically a from IP:PORT address and a to IP:PORT address. The TCP/IP packet is produced by the underlying layers of the TCP/IP protocol. You cannot set the IP address in the packet for a couple of reasons - you don't have access to it and the responses sent back by the receiving server would not come back to you.

You also cannot "temporarily" change your IP address, because you would no longer be on your network and you could not communicate at all with your upstream router. If you happened to change your IP address and are still in your network, routers/TCP/IP protocol detects duplicates and would not allow it.

Short answer - you can hide a true IP address by using a proxy, but you cannot use someone else's IP address.

If you describe what it is you are trying to accomplish (as long as it is not setting up a phishing site or trying to break into someones account) we can probably point you in the right direction to find a way of doing it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum