Submitting forms through CURL

POST /index.php?rv=97de1c36d775f66641c17dcdc751bd57 QRY=66.69.230.99&submit=IP+address+%2F+Host+Lookup

I wan to be able to save an ip address as a variable, run my script and have it open up “http://www.ip-adress.com” and input in the ip address search box, my ip address variable. Above is the header I obtained on the site using firefox’s live header program.

I tried using this script:


set cityState to do shell script "curl -F \"QRY=" & ipAddy & "\" " & address & "

but it only returns my ip address (since this is what comes up everytime you visit ip-adress.com. because this site requires a password, and because I’m having difficulty accessing the ip info through curl alone, sans a web browser, I’m content to have my script open up a web browser (preferably Safari) to retrieve the info. but I want to be able to type in an ip address on my script, and not on the actual webpage. Any suggestions?