PHP – File Upload Stream

PHP supports upload file stream… we can stream data to server using PHP stream_open() & stream_write() functions. There is alternate method in PEAR to transfer files to server1 to server2. PEAR have HTTP package for uploading files. HTTP_Request supports GET/POST/HEAD/TRACE/PUT/DELETE, Basic authentication, Proxy, Proxy Authentication, SSL, file uploads etc. <?php require_once “HTTP/Request.php”; $req =& new HTTP_Request(“http://domain.com/upload”); $req->setBasicAuth(“login”, “pass”); $req->setMethod(HTTP_REQUEST_METHOD_POST); $result = $req->addFile(“data”, “/home/svnlabs.mp4”); … Read more