url("test")
необходимо вытащить test. preg_match_all('url/\("(.+?)"\)/', $css, $arr);
Warning: preg_match_all(): Delimiter must not be alphanumeric or backslash in /var/www/game/public/generals_mobi_imageDowload.php on line 4 Warning: Invalid argument supplied for foreach() in /var/www/game/public/generals_mobi_imageDowload.php on line 6
$css = file_get_contents("http://generals.mobi/styles/main.css");
preg_match_all('/url\("(.+?)"\)/', $css, $arr);
foreach ($arr as $e) {
$e = preg_replace('/url\("/', "", $e);
$e = preg_replace('/"\)/', "", $e);
print_r($e);
}
Как получить
../img/mines/terrorists/6.jpg
не подскажете?