Well, go to whatever site you want to connect to. Do what you want to automate through the script. Then, read the URL. Example:
Dict.org
-- visit www.dict.org
-- search for: "PHP"
-- read url: www.dict.org/bin/Dict
Google.com
-- visit www.google.com
-- search for: "PHP"
-- read url: www.google.com/search?q=PHP
Okay, so now you know what the URL ends up as. For dict.org, it uses posts so that "requires" cURL (Zend has a tutorial on not using cURL for Posting items).
Anyway, so we know we need to post information to the url we end up at. Problem solved. We then use cURL to POST the term ("Query"), what to search for ("Strategy"), and what database to look in ("Database"). Once you properly fill those values, you should get the result you want.
I figured out what to post by looking at the source code of the form. You can also get the values from there as well.
~Brett