Re: Accepting File Uploads from CURL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

on 06/15/2006 11:56 AM Brad Bonkoski said the following:
> Hello All,
> I am using PERL to generate an XML file from a database query.  no
> problems there.
> I then try to use curl to send it to an upload script.
> Essentially the command line looks like this: curl -H
> 'Content-Type:text/xml' -d file.xml server/up.php
> for my up.php I am just trying to dump stuff out, like the POST and
> FILES arrays
> Both those arrays are empty.
> 
> Any thoughts on how to debug this, and/or suggestions for handling this?

You do not need to use a separate program to upload files with forms.
You can use PHP with socket connections.

Take a look at this pure PHP HTTP client class that lets you post files
for upload. You can just point it to a local file or some dynamically
generated data. It lets you choose the the file name in case you do not
want to use the local file name. Take a look at the test_http_post.php
example:

http://www.phpclasses.org/httpclient


-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux