|
Posted by Manuel Lemos on 12/18/05 11:50
Hello,
on 06/12/2006 03:49 PM HC said the following:
> Hi everybody :)
>
> I am trying to write a script that makes cURL submit the following form:
>
> <form method="post" action="script.php" enctype="multipart/form-data">
> <input type="file" name="somefile">
> <input type="submit" value="Send File">
> </form>
>
> I've found a few examples of how to do this, but they all require me
> creating a file first. I have the data I would like to submit in a PHP
> variable, and for security reasons, I would prefer not to write this to
> a file.
>
> If anyone has any ideas on this, that would rock all kinds of worlds.
You may want to try this HTTP client class. It supports submitting forms
including uploading files. 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/
[Back to original message]
|