How Auto Post Form then Read Results from resulting request

Discussion in 'PHP' started by datropics, Jul 20, 2008.

  1. #1
    Hey PHPsters!

    This is what I want to do:
    1) From my website (domain x.com) - I want to submit a compiled form (which I create) to another domain (y.com) and afterwards read the results from the posting of that form.

    OR

    2) Get the Country that a persons is visiting my website from.

    I have a function that generates an email whenever any of my banners are clicked (I know I know, I'm working on that). In the email I have the IP address for the visitor of the site. What I want instead is the Country, Region and City.

    How can I get this done?

    Thanks for the help in advance! :)

    daTropics
     
    datropics, Jul 20, 2008 IP
  2. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #2
    1. Use curl to submit the form.

    2. You need a geoip db that maps ip address to physical location
     
    matthewrobertbell, Jul 20, 2008 IP
  3. Thirtysixway

    Thirtysixway Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you don't have cURL available, you could also use the fake ajax method involving an iframe and javascript. It's a bit messy to work with but it works. PM me if you're interested.
     
    Thirtysixway, Jul 20, 2008 IP