Pay attention on request headers and iconv for the charset conversion.
If you don't convert the string from windows-1251 in utf-8, preg_match will fail.
After conversion I used a simple regular expression to extract the phone numbers from the whole page.
<?php
$url = 'http://vashmagazin.ua/cat/catalog/?rub=100&subrub=1';
$ch = curl_init();
$request_headers = array
(
"Accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Charset" => "windows-1251,utf-8;q=0.7,*;q=0.3",
);
$header = array();
foreach ($request_headers as $key => $value)
$header[] = "{$key}: {$value}";
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7');
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$html = curl_exec($ch);
curl_close($ch);
$html = iconv("windows-1251", "UTF-8", $html);
$matches = array();
$pattern = '/\([0-9]{3}\)[0-9]{3,}\-[0-9]+/us';
if (preg_match_all($pattern, $html, $matches))
{
var_dump($matches);
}
?>
The source code above is fully tested and fully working.
If you can't install the curl library try to replace the curl block with a file_get_contents($url).
To install curl on your operating system search on google, on Ubuntu use sudo apt-get install curl libcurl3 php5-curl and restart apache.