Another option is to use CURL. Write another php-page that takes a
couple of parameters and pass the parameters to this page. CURL exists
for a whole bunch of languages.
Not that I've explored this myself, but I guess AJAX is a third option.
Check out xmlHttpRequest and it's peer functions.