It's simple, it's just the regex pattern thats tricky.
irc.freenode.net #regex
They'll help you out though
Printable View
It's simple, it's just the regex pattern thats tricky.
irc.freenode.net #regex
They'll help you out though
Something like this Jack?
http://79.64.224.188:1337/jack.php
That should work :)PHP Code:<?php
$url = file_get_contents("http://www.habbo.co.uk/myhabbo/styles/assets.css");
$look4 = "/background-image: url\((.*?)\);/";
preg_match_all($look4, $url, $images);
$echo = implode('<br> ', $images[1]);
echo "$echo";
?>
EDIT: and if you want to display the number of images.
EDIT AGAIN: if you want to view the images on the page:PHP Code:<?php
$url = file_get_contents("http://www.habbo.co.uk/myhabbo/styles/assets.css");
$look4 = "/background-image: url\((.*?)\);/";
preg_match_all($look4, $url, $images);
$echo = implode('<br> ', $images[1]);
echo "$echo";
echo "<hr>There are currently ";
$number = preg_match_all($look4, $url, $images);
echo "$number";
echo "images/backgrounds";
?>
PHP Code:<?php
$url = file_get_contents("http://www.habbo.co.uk/myhabbo/styles/assets.css");
$look4 = "/background-image: url\((.*?)\);/";
preg_match_all($look4, $url, $images);
$echo = implode('<br> ', $images[1]);
echo "$echo";
echo "<hr>There are currently ";
$number = preg_match_all($look4, $url, $images);
echo "$number";
echo " images/backgrounds";
echo "<hr>";
$tochange = "$echo";
$start = array("http", "gif", "png", "jpg");
$replace = array("<img src=http", "gif>", "png>", "jpg>");
$htmlimages = str_replace($start, $replace, $tochange);
echo "$htmlimages";
?>