RE: A curl question

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

 



Ray:

I would suggest using the -d (or --data) flag.  That allows you to send
POST data.

example:

exec(curl -d "name=Rafael%20Sagula&phone=3320780"
http://www.where.com/guest.php)

Yes, I understand -d -- is there a way to use that AND to provide userID and password?

Thanks.

tedd


For more information, check the man page for cURL and search for POST
within that document.  Or check out the PHP Manual for the appropriate
CURL syntax with LibCURL

http://us3.php.net/manual/en/function.curl-init.php

I have a script that uses the exec statement (was inherited from the
last guy) and I'd be interested to know if libCURL makes the script
wait on that line until CURL returns the result.  Sometimes when
getting data from a really slow site, scripts will take a lot longer
than expected (10-15 minutes).  I would assume that both ways would
have the same effect, but efficiency is always king ;)

HTH

Ray

 -------- Original Message --------
 Subject:  A curl question
 From: tedd <tedd@xxxxxxxxxxxx>
 Date: Mon, January 02, 2006 9:07 am
 To: php-general@xxxxxxxxxxxxx

 Hi:

 I've asked this question on the curl-and-php@xxxxxxxxxxxx list, but
 replies were few and didn't address the problem. Whereas, I've seen
 considerable discussion of curl on this list, so here goes.

 I am writing a client-side application that uses curl commands to
 communicate with a php application.

At present I can send the php application logon, password, and variables via:

 curl -u userID:password --url http://mydomain.com/myApp.php?what=what

 That works!

 However, I would like to send the variables hidden instead of
 attached to the url. So, what would the curl command be?

 Many thanks for any suggestions or solutions.

 tedd

 --

--------------------------------------------------------------------------------
 http://sperling.com/

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

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


--
--------------------------------------------------------------------------------
http://sperling.com/

--
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