Jump to content

cURL output font


The Little Guy

Recommended Posts

I am using cURL to get the title of a page (if there is one).

 

Some sites, such as http://aria.ru/ are not in English, so I think my php doesn't know what to do with the text, so it is giving symbols back to me. I do believe that the "Arial" font does support this language, because in "Notepad" it displays the text just fine in "Arial".

 

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $_POST['s']);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
$opt = curl_exec($ch);
curl_close($ch);
echo $opt;

 

Does anyone know why the text shows as symbols, and how I can fix it?

Link to comment
https://forums.phpfreaks.com/topic/144541-curl-output-font/
Share on other sites

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.