residual Posted November 5, 2007 Share Posted November 5, 2007 <?php $h3tag = $_GET['h3tag']; if (empty($h3tag)) { $h3tag = 'blank'; } $h3tag = str_replace(" ","%20",$h3tag); $ch = curl_init(); $timeout = 5; curl_setopt ($ch, CURLOPT_URL, 'http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag='. $h3tag); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $in1 = curl_exec($ch); curl_close($ch); preg_match('#<Info>(.+?)</Info>#',$in1, $online1); preg_match('#<Info2>(.+?)</Info2>#',$in1, $status1); $online = $online1[1]; $status = $status1[1]; $output = '<div> Online Status: ' . $online . '</div><div> Status: ' . $status . '</div>'; echo $output; ?> This works fine for $online but not for $status. Please anyone any ideas? ??? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.