You are here: RE: [PHP] A curl question « PHP « IT news, forums, messages
RE: [PHP] A curl question

Posted by ray.hauge on 01/02/06 20:39

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)

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: [PHP] A curl question
> From: tedd <tedd@sperling.com>
> Date: Mon, January 02, 2006 9:07 am
> To: php-general@lists.php.net
>
> Hi:
>
> I've asked this question on the curl-and-php@cool.haxx.se 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация