Reply to RE: [PHP] A curl question

Your name:

Reply:


Posted by ray.hauge on 01/03/06 17:30

I haven't tried it, so I don't know if -d doesn't work with -u, but if
that is the case, you could change your URL to this:

curl -d "what=what" http://user:password@www.mydomain.com/myApp.php

or try this:

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

HTH

Ray
> -------- Original Message --------
> Subject: RE: [PHP] A curl question
> From: tedd <tedd@sperling.com>
> Date: Mon, January 02, 2006 5:50 pm
> To: php-general@lists.php.net
>
> 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: [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
> >
> >--
> >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

[Back to original 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

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