[ Fill a form with curl using previously saved client IP address ]
I'm developing a php application which register name, email and the ip address of the user who is filling the form.
When the form data is saved, i have to fill another form in another website with curl.
I need to use the client ip address or maybe a random ip address when i will fill the new form because the application where is the second form does not need to know my server ip address.
Is there any solutions to realize this curl request with different IP each times i will fill the form ?
Thanks in advance !
PHP runs at the server side. So you can not perform such request through PHP from client's end. However, you can use the following options to hide your server from the target.
Preferred method is using proxy:
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_PROXY, "220.127.116.11:8800");
Alternately you can try using IP binding. If your server has multiple IP addresses, you can uses them like below:
curl_setopt($ch, CURLOPT_INTERFACE, "18.104.22.168");
If you have more time, you can read about the HTTP request header 'X-Forwarded-For'. This can be interesting for your solution too as well.