Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
seolib.ru
pr-cy.ru
class TYGrabber
{
  public function getTy($url) {
    $full_url = "http://bar-navig.yandex.ru/u?ver=4.2.0&url=".urlencode($url)."&show=1";
    $xml = $this->getContentCurl($full_url);
    $regex = '|<tcy rang="([0-9]*)" value="([0-9]*)"/>|is';
    preg_match($regex, $xml, $out);
    return $out[2];
  }
  private function getContentCurl($url) {
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_HEADER, 0);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
      $result = curl_exec($ch);
      curl_close($ch);
      return $result;        
    }
}$ty = new TYGrabber();
$file = file("list_for_check.txt");
foreach ($file as $url) {
  $my_ty = $ty->getTy($url);
  echo "TY: {$my_ty}<br>\r\n";
  flush();
}