CURL: not selecting URLs with Unicode characters

I use CURL to get Yahoo! BOSS api url with unicode request, but I get a 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 help me 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); 
+4
source share
1 answer

Take this word and use the Mysql_realescape String in PHP.

Regards, ARCHIT.

-7
source

Source: https://habr.com/ru/post/1314981/


All Articles