Answer the question
In order to leave comments, you need to log in
How to parse the url(") property?
Hello. url("test")
You need to extract test from the expression .
Tried to do it with a regular preg_match_all('url/\("(.+?)"\)/', $css, $arr);
expression
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
Answer the question
In order to leave comments, you need to log in
Thanks for the help index0h !
$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);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question