zell11 Posted November 16, 2007 Share Posted November 16, 2007 Hey there, I am having a problem when I am using curl_exec. When i try and send a request using it all it does is come up and page asking me to save the php file that was user to call it. Does anyone know what could cause this? Thanks Link to comment https://forums.phpfreaks.com/topic/77625-curl_exec-causing-browser-asking-to-save-php-file/ Share on other sites More sharing options...
ainoy31 Posted November 16, 2007 Share Posted November 16, 2007 Can we see the curl part your code? Link to comment https://forums.phpfreaks.com/topic/77625-curl_exec-causing-browser-asking-to-save-php-file/#findComment-393032 Share on other sites More sharing options...
zell11 Posted November 22, 2007 Author Share Posted November 22, 2007 $ch = curl_init(); curl_setopt ( $ch, CURLOPT_URL, $this->config->get( "Configuration.host" ) ); curl_setopt ( $ch, CURLOPT_POST, true ); curl_setopt ( $ch, CURLOPT_POSTFIELDS, $xmldoc->getDocument() ); curl_setopt ( $ch, CURLOPT_HTTPHEADER, array('Expect: ') ); // Save the response in the response variable // $this->response = curl_exec($ch); $this->errno = curl_errno ($ch); $this->err_str = curl_error ($ch); $this->curl_getinfo = curl_getinfo($ch); sorry bout the long time before i replied Link to comment https://forums.phpfreaks.com/topic/77625-curl_exec-causing-browser-asking-to-save-php-file/#findComment-396775 Share on other sites More sharing options...
Azu Posted November 22, 2007 Share Posted November 22, 2007 Trying setting the mimetype to text/html? Link to comment https://forums.phpfreaks.com/topic/77625-curl_exec-causing-browser-asking-to-save-php-file/#findComment-396800 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.