Z
Z
zi2016-02-10 04:29:39
PHP
zi, 2016-02-10 04:29:39

How to get the number of sharings of material on the site in contact for the Cyrillic domain?

I ran into a problem - I can't get the number of shares of material on the site in contact. Most likely the problem is that the domain is Cyrillic, because the code I use works fine for domains in Latin.

$vk_request = file_get_contents('http://vkontakte.ru/share.php?act=count&index=1&url=http://'.$MY_URL);
$tmp = array();
preg_match('/^VK.Share.count\(1, (\d+)\);$/i',$vk_request,$tmp);
echo "ВКонтакте: ".$tmp[1]."<br>";

I tried to encode the domain in punnycode, the result is exactly the same. Maybe someone faced a problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2016-02-10
@xmoonlight

idnconv.ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question