<?php $map = 'Unknown'; $ip = '127.0.0.1:27015'; $player = [0, 0]; if($curl = curl_init('monitor-css.ru/components/html0/&host=85.143.221.165:27015')) { curl_setopt($curl,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']); curl_setopt($curl,CURLOPT_REFERER,'monitor-css.ru'); curl_setopt($curl,CURLOPT_TIMEOUT,30); curl_setopt($curl,CURLOPT_RETURNTRANSFER, true); $html = curl_exec($curl); curl_close($curl); preg_match_all('#<div class="item_float_right">(.*?)</div>#us', $html, $matches); $map = trim(strip_tags($matches[1][1])); $ip = trim(strip_tags($matches[1][0])); $player = explode('/', trim(strip_tags($matches[1][2]))); } echo '<pre>'; echo $map . PHP_EOL; echo $ip . PHP_EOL; echo $player[0] . ' из ' . $player[1] . PHP_EOL; ?>