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

curl-and-php

RE: meaningless characters & cookie problem

From: Cenk Uysal <cenk_uysal_at_yahoo.com>
Date: Fri, 21 Feb 2003 09:09:10 -0800 (PST)

oh i think the problem is "all about php" :)

it works fine by following code:

<?php
$ch =
curl_init("http://www.alibaba.com/trade/company/cat/280501.html");
        
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
        
ob_start();
$result = curl_exec ($ch);
ob_end_clean();
                
curl_close ($ch);

echo "$result";
?>

but it gives these meaningless characters with this code:

<?PHP
$ch =
curl_init("http://www.alibaba.com/trade/company/cat/280501.html");
        
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
        
ob_start();
$de = curl_exec($ch);
$result = ob_get_contents();
ob_end_clean();

curl_close ($ch);

echo "$result";
?>

i dont know what is wrong with second code but i dont mind anymore :)

***************

cookie problem still goes on.

here is the header that is created when i login to page:

__ALI_DW_ID__=Mw/gepV9bxQ+tO9c2kk+3Bnkw5MczpcBIo2RBr0jOTCWRZlyRs/SxRUDqz7WipD98uIFzcAN
mUY=; Domain=.alibaba.com; Path=/; Expires=Mon, 24-Apr-2006 02:38:53
GMT

and this is the cookie header that COOKIEFILE carries to second page:

__ALI_DW_ID__=Mw/gepV9bxQ+tO9c2kk+3Bnkw5MczpcBIo2RBr0jOTCWRZlyRs/SxRUDqz7WipD98uIFzcANmUY=

where is the rest of this cookie?!!

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
Received on 2003-02-21