The easiest way is to search for a double slash. Although it would be fair to have a relative path, this will happen after a period (any domain or IP), a GET variable ( .js?variables// ) or another path ( js/path//to.js ). To do this, use the following code.
foreach ($array as $path) { if (strpos($path, '//') >= max(strpos($path, '.'), strpos($path, '/'))) {
source share