$reply = curl_exec($this->ch); if ($reply == NULL) { // The command line goes in here, the browser does not $error = "Curl error: " . curl_errno($this->ch) . " - " . curl_error($this->ch) . "\n"; throw new MyException("WCT Fault: $error" . eval($errorComment), 1); }