php - Automated form submission to an external script -
got question , i'm not sure it, thought i'd ask.
one of pages on server contains ordinary html form, designed contact external script form submission.
if open page, enter information in fields manually, , hit "process", external script will, naturally, record own ip address visitor.
what ip address record if automate form submission using server-side method, such curl? record server's ip address, since server sending automated request script, or record client's ip address, usual?
if rely on $_server["remote_addr"]
, record address sees in request, depends on how routing on server set up. if you're sending request localhost - record localhost (127.0.0.1) rather server`s external ip even.
if request originates visitor surfing web, have multiple options of keeping track:
use standard
x-forwarded-for
header in sub-request , track track proxied request. (check if$_server["http_x_forwarded_for"]
passed , use real address, otherwise fallback$_server["remote_addr"]
).pass original ip custom parameter , track instead of
remote_addr
when request comes source (eg localhost).
Comments
Post a Comment