note 36457 added to function.curl-setopt

From: Date: Fri, 10 Oct 2003 06:24:09 +0000
Subject: note 36457 added to function.curl-setopt
Groups: php.notes 
Request: Send a blank email to php-notes+get-58178@lists.php.net to get a copy of this message
I had to POST a multipart/form-data file upload with a specific content type (text/xml), but the php curl functions were only sending it as text/plain. Not only that, but I had to use BASIC authentication to make the POST. On Linux I was able to use the backtick operator to do the deed: <?php $exec = "/usr/local/bin/curl -u $username:$password " . "-F \"file=@$my_upload_file;type=text/xml\" " . $upload_url; $response = $exec; ?> ---- Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36457 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36457&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36457&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#58178) next »