Answer the question
In order to leave comments, you need to log in
How to parse the registration date of VKontakte?
Here is the code itself:
<?
$url=' vk.com/foaf.php?id= '.$_GET[id];
$curl = curl_init();
curl_setopt($curl,CURLOPT_URL,$url);
curl_setopt($curl,CURLOPT_HEADER,1);
curl_setopt($curl,CURLOPT_POST,1);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl,CURLOPT_USERAGENT,"Opera/10.00 (Windows NT 5.1; U; ru) Presto/2.2.0");
curl_setopt($curl,CURLOPT_FAILONERROR,1);
curl_setopt($curl,CURLOPT_REFERER," vk.com ");
$res = curl_exec($curl);
preg_match_all("#ya:created dc:date=\"(.+?)\"/>#", $res, $match);
$data = $match['1']['0'];
echo $res;
echo'Page registered: '.$data;
Answer the question
In order to leave comments, you need to log in
print_r( file_get_contents('http://vk.com/foaf.php?id=1') );
When I need to see the date of registration of any VKontakte page, I go to this site - searchperson.ru
and simply indicate the link to the profile or VKontakte community.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question