posting plain/text with CURL?

From: Date: Fri, 26 Jan 2001 09:48:19 +0000
Subject: posting plain/text with CURL?
Groups: php.general 
Request: Send a blank email to php-general+get-36801@lists.php.net to get a copy of this message
Q: Is it possible to post plain/text data from PHP with the build-in CURL functions? Hello Mr. General PHP! I want to post PLAIN/TEXT data to some webpage (through SSL). I want to do this in PHP by using the build-in CURL support. However, by default, CURL is posting the data as "url-encoded.." (as if it came from a form), but I want it to be "plain/text" (not var=value pairs)! If I use the CURL binary (calling it from the commandline), I can specify extra header-info and force the postdata to be interpreted as plain/text. Like this: curl [....] -H "Content-Type: plain/text" This works perfectly! Is it possible to do this by using the build-in CURL functions? M. Homminga

« previous php.general (#36801) next »