curl-and-php
Problem with new line
Date: Sat, 8 Mar 2003 13:47:27 +0100
When i use the -F option with curl it doesnt seem to send anything after a new line in a <textarea>.
The site i am posting my data to only displays the first line from the <textarea>
this is the whole string i use exec(); on:
$cmd = '/usr/local/bin/curl -e -F "txtName='.$POST["name"].'" -F "txtPhone='.$POST["phone"].'" -F "txtEmail='.$POST["email"].'" -F "sltNew_Zon='.$region[7].'" -F "txtCity='.$POST["subrgn"].'" -F "txtMode='.$type[7].'" -F "sltNew_Cate='.$category[7].'" -F "txtTitle='.$POST["header"].'" -F "txtDesc='.$POST["text"].'" -F "txtUrl='.$POST["infolnk"].'" -F "txtNameUrl='.$POST["infotitle"].'" -F "userfile='.$data['userfile'].'" -F "txtPassword='.$POST['password'].'" -F "submit=Lägg in annons" -e http://www.fyndtorget.se/annons_new.php http://www.fyndtorget.se/check.php';
Now everything works fine besides the "txtDesc" which only displays the first line on the <textarea>. I have not urlencoded any data as I've learned that you shouldnt do that when using "-F".
(maybe you think $POST looks strange. But i'm doing this from a function which i have sent the $_POST variable to and named it $POST).
/Per Sandberg
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
Received on 2003-03-08