On Fri, October 20, 2006 3:20 am, Marc Roberts wrote: > Is it possible to use php to check that the .css file in the html of a > web page is the correct one e.g. check if the file included in the > html > is new.css. > > I think I will have to write a regex but if anyone has any ideas (or > already has a regex to do this), it would be much appreciated.
Depends how fancy you want to get... $html = file_get_contents('http://php.net/'); if (strstr($html, ' <style type="text/css" media="all"> @import url("http://static.php.net/www.php.net/styles/site.css"); @import url("http://static.php.net/www.php.net/styles/phpnet.css"); </style>')) echo "Yup, it's got that CSS in there<br />\n"; else echo "Nope, they changed their CSS<br />\n"; -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php