papaface Posted July 10, 2011 Share Posted July 10, 2011 Hey I wonder if someone can help be debug a script that is giving me a right headache. The script receives data from an API. I have this code: $message="<html><head><style> body,td { font-family: verdana; font-size: 11px; font-weight: normal; } a { color: #0000ff; } </style></head><body>".$message."</body></html>"; echo "hello"; $Users=getClients(); getClients() function: function getClients(){ global $count,$INCREMENT; $url = "http://URLapi.php"; $username = "dev"; $password = "password"; $postfields["limitstart"] = $count; $postfields["limitnum"] = $INCREMENT; $postfields["action"] = "getclients"; $postfields["username"] = $username; $postfields["password"] = md5($password); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); echo $data; $xml = simplexml_load_string($data); $Xml = simpleXMLToArray($xml,true,true,true); return $Xml; } If you look in the first bit of code you'll see echo "hello"; If I remove this the data from the cURL request outputs to the screen via my echo $data; code. If I keep echo "hello"; it stops processing and nothing is displayed. What could be causing this? Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted July 10, 2011 Share Posted July 10, 2011 Have you done a 'view source' in your browser of the page? Quote Link to comment Share on other sites More sharing options...
papaface Posted July 10, 2011 Author Share Posted July 10, 2011 Found the issue and for some reason it is IE. I tried it in firefox and it worked without an issue. How strange... 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.