addServer(); echo "Sending job\n"; $iniString = file_get_contents($argv[1]); $handle = $client->doBackground("invoke_image_build", $iniString); $handlehash = md5($handle); echo "Job sent, handle was ".$handle." - hash ".$handlehash."\n"; $db = mysql_connect("localhost", "gentoaster", ""); if(!$db) die("Could not connect to database ".mysql_error()); mysql_select_db("gentoaster"); $query = "INSERT INTO builds (id, handle)". ." VALUES('".$handlehash."','".$handle."')"; mysql_query($query); echo "Job handle mapping added to database\n";