note 72196 added to function.http-post-fields

From: Date: Sun, 07 Jan 2007 11:21:16 +0000
Subject: note 72196 added to function.http-post-fields
Groups: php.notes 
Request: Send a blank email to php-notes+get-121375@lists.php.net to get a copy of this message
It was hard to figure out how to actually post files with this function. The "Array of files to post" is an array of associative arrays, each need the keys "name", "type" and "file". Consider this example code: <?php $files = array( array( 'name' => 'somename', 'type' => 'text/plain', 'file' => $filename ) ); $http_response = http_post_fields($url, $data, $files); ?> ---- Server IP: 212.124.37.9 Probable Submitter: 84.158.243.102 ---- Manual Page -- http://www.php.net/manual/en/function.http-post-fields.php Edit -- https://master.php.net/note/edit/72196 Del: integrated -- https://master.php.net/note/delete/72196/integrated Del: useless -- https://master.php.net/note/delete/72196/useless Del: bad code -- https://master.php.net/note/delete/72196/bad+code Del: spam -- https://master.php.net/note/delete/72196/spam Del: non-english -- https://master.php.net/note/delete/72196/non-english Del: in docs -- https://master.php.net/note/delete/72196/in+docs Del: other reasons-- https://master.php.net/note/delete/72196 Reject -- https://master.php.net/note/reject/72196 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#121375) next »