If I understand your situation right, what you've got is a PHP program using cURL to submit a form to another page, and that other page is using $_SERVER['REMOTE_ADDR'].
The thing is, it is the correct value: the PHP program's submission via cURL is an entirely different http transaction from the one the initiated by the user's PC; the program making the request is the client for the purposes of this different transaction, and so the remote_addr is naturally the address of the machine on which that program is running.
What you'll need to do is supply the user's IP (gathered from $_SERVER['REMOTE_ADDR'] by the submitting PHP program) as part of your submission in some way. As an additional form field, perhaps, or (not that I've tried it) maybe in a custom header ("X-Forwarded-For:" seems like a good name). Either way, the receiving script will need to know where to look for it.