Jump to content

CURL Content-type setting


bsmurfy

Recommended Posts

Hi All,

 

I'm trying to upload a gif file via php/curl, and the browser keeps interpreting the content-type as application/xml. I've tried explicitly setting the content type, see below, but it has no effect. Any thoughts? I've seen conflicting posts on the ability to specify the content-type with curl/php.

 

curl_setopt($session, CURLOPT_HTTPHEADER, array(
                                                "Content-Type: image/gif",
                                                'Content-length: ' . strlen($post)

                                                ));

Link to comment
https://forums.phpfreaks.com/topic/252162-curl-content-type-setting/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.