cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

script works in windows but not on any of the linux

From: yaris dong <yaris684_at_gmail.com>
Date: Wed, 7 Jan 2009 22:36:28 -0800

i have a simple script that logs in and submits a form field on a site, it
then scrapes the few stuff. nothing intensive. the script itself is fine.
linux has been tested on libcurl 7.19 and 7.15.x
windows uses 7.16

the problem is the library.

it uses LIB_http.php, found in a php book from i think 2005.

http://pastebin.com/m65fcf682

i've put VERBOSE on to see what was different.

at first i realized, linux was making GET on login.php, while windows was
doing POST. Therefore the script worked fine on windows server and windows
localhost (wampserver)

i talked to a few people and they told me to move

   1. curl_setopt($ch, CURLOPT_HEADER, $incl_head); // Include head as
   needed
   2. curl_setopt($ch, CURLOPT_NOBODY, FALSE); // Return
   body

   above the # GET METHOD CONFIGURATION line.

   by doing that, the script was able to login, however still unable to post
   to the field properly.

   i dont understand why LINUX is crapping out while on windows, it has
   worked beautifully.

   i dont think it has to do with libcurl version.

   somethings not quite fit with LIB_http.php, i just dont know what to look
   for, and what to change.

   Please help, i have been stuck on this problem for weeks now. I have
   googled, posted on multiple forums, spent days on ##php on freenode, and no
   one could solve this.

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2009-01-08