Reputation: 699
On some of my sites I have cURL pulling a script from another one of my domains - that script needs to get access to the IP of the person visiting the site, but I'm stumped at how to do that.
Because I'm using cURL, the REMOTE_ADDR variable is the server's IP address.
How can I collect the user's IP address?
Upvotes: 0
Views: 86
Reputation: 76
You could simply grab it before you send your CURL request and alter the URL to fetch by appending a URL encoded version of the user's IP (or you could do a POST request rather than GET and just have it as a posted field).
Upvotes: 3