Jump to content

CURL url with unicode(chinese, hindi) characters


kaartz

Recommended Posts

I'm using CURL to fetch a Yahoo! BOSS api url with a unicode query, but I'm getting an "bad request" error.

 

    http://boss.yahooapis.com/ysearch/web/v1/கமல்ஹாசன்?appid={appid}&format=xml

 

The above url works fine and returns results in firefox.

 

Please could anybody help me to fix this.

 

    $url = "http://boss.yahooapis.com/ysearch/web/v1/கமல்ஹாசன்?appid={appid}&format=xml";

 

    $ch - curl_init($url);

    curl_setopt($ch, CURLOPT_HEADER, true);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

   

    $data = curl_exec($ch);

   

    curl_close($ch);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.