. // example code for making a remote job submission $ch = curl_init("http://foo.edu/test/submit.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "request= xxx uppercase 100e9 --t ALPHA http://foo.edu/index.php name "); $reply = curl_exec($ch); if (!$reply) die("HTTP op failed\n"); echo "reply: $reply\n"; exit; $r = simplexml_load_string($reply); if (!$r) die("bad reply: $reply\n"); $name = $r->getName(); if ($name == 'estimate') { echo "estimate: ".(string)$r->seconds."\n"; } else if ($name == 'error') { foreach ($r->message as $msg) { echo "$msg\n"; } } else { die("bad reply\n"); } ?>