cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Using cURL with PHP

From: tengel <tengel_at_sonic.net>
Date: Mon, 1 Jul 2002 16:14:48 -0700

A lot of PHP functions don't allow/support inline string concatination/evaluation/manipulations/etc. Try breaking it out into two steps:

<?php
 $listinfo_1="foo".$listline;
 $listinfo_2="bar".$listline;
 exec("curl -d blahblah -s -o $listinfo_1 $listinfo_2");
?>

fwiw,
-te

On Mon, Jul 01, 2002 at 03:37:03PM -0500, Jay Blanchard wrote:
> I can do this;
>
> <?php
> exec("curl -d \"name=myname&password=mypassword&btnsubmit=submit\" -s -o
> cdrlist.html https://theserver.com/list.html");
> ?>
>
> but why can't I do this
>
> <?php
> exec("curl -d \"name=myname&password=mypassword&btnsubmit=submit\" -s -o
> ".$listline." https://theserver.com/download/".$listline."");
> ?>
>
>
> The only change is that I have now made the php variable $listline available
> as there is a routine that steps through each file from the list. I can
> print the line out and it looks correct. Am I missing something?
>
> Thanks!
>
> Jay
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf

-- 
Troy Engel
GPG KeyID: DF3D5207
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-07-02