Look at cURL. You'll need the first PHP script to be running on a web server.
If you're not running a server, look at $argv and/or getopt.