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

curl-and-php

RE: How to a parse result using curl?

From: Dan Brown <dbrown_at_attbi.com>
Date: Sun, 24 Feb 2002 21:23:55 -0800

Thanks for your help Ed!

This does separate the value's but it assigns them new names? I need to make
the value's variables that I can plug in anywhere I like. And I need to
suppress the output of what's returned and only display what I put in the
table.

I hope I'm making sense?!

Thanks a ton everyone!

-Dan

-----Original Message-----
From: curl-and-php-admin_at_lists.sourceforge.net
[mailto:curl-and-php-admin_at_lists.sourceforge.net]On Behalf Of Ed Burie
Sent: Sunday, February 24, 2002 6:18 AM
To: curl-and-php_at_lists.sourceforge.net
Subject: Re: How to a parse result using curl?

$TmpResult = $result;

$cnt = 1;

while ($TmpResult = strchr($TmpResult,"="))
{
        if (strpos($TmpResult,"<br>") > 0)
                $value = substr($TmpResult,1,strpos($TmpResult,"<br>")-1);
        else
                $value = substr($TmpResult,1);
        print "Name$cnt = $value<br>";
        $TmpResult = substr($TmpResult,2);
        $cnt++;
}

Hope this helps...

-Ed

At 02:13 AM 2/24/02 -0800, you wrote:

Hi everyone!

This newbie is over his head again! Any help would be appreciated&

I m trying to parse the result from curl. So far my code basically ends with
$result = curl_exec ($ch);

Curl outputs the results to the browser. I need to be able to not only parse
it, but to put the values into a table. The return string is separated by
<BR>

Example: name1=value1<br>name2=value2<br> name3=value3<br> name4=value4

I need it to display like below in a table:

|Text here $value1
|Text here $value2
|Text here $value3
|Text here $value4

Any idea s/help/examples would be greatly appreciated! I ve looked through 2
PHP books and I m still lost :-(

Thanks everyone!

Dan
Received on 2002-02-25