curl-and-php
images, forms, and curl
Date: Sun, 16 Jun 2002 13:41:22 -0700 (PDT)
Hi guys I am very new to PHP but having excellent luck
so far. Here is where I am stuck.
I wrote an HTML form which takes in a bunch of text
fields and an image. The tag i used for the image is
<input type="file" name="picture">
Now i POST this info to my PHP program. The PHP
program then uses cURL to POST to another script (not
written by me).
I have no problem transfering the text fields from the
form to the other script through my PHP. However, I
am unsure of how to send the file along.
This is how my PHP script works:
$myData =
"param1=$_POST[field1]&paparm2=$_POST[field2]&image=".$_POST[picture];
Next the script POSTs with cURL (no problems there).
Of course $_POST[picture] comes out completely empty.
I realize that this is totally wrong b/c I need to
actually capture the image data sent by the browser
and then somehow get this into my cURL POST. I have
no idea how!
thanks,
adam schwartz
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
_______________________________________________________________
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
Received on 2002-06-16