<?php
$subject = 'Ingress Intel Map
https://www.ingress.com/intel?ll=55.756471,37.122987&z=17&pll=55.756471,37.122987';
$pat_portal = '/intel\?([a-z0-9\=\.\,\&]+)pll=(\d+.\d+),(\d+.\d+)$/';
$pat_location = '/intel\?ll=(\d+.\d+),(\d+.\d+)&z=(\d+)/';
if(preg_match($pat_portal, $subject, $matches)){
echo "портал: lat - {$matches[2]} , lng - {$matches[3]}";
}elseif(preg_match($pat_location, $subject, $matches)){
echo "локация: lat - {$matches[0]} , lng - {$matches[1]} , zoom - {$matches[2]}";
}
?>
preferences:
27.2 ms | 405 KiB | 5 Q