summericeweb Posted April 3, 2006 Share Posted April 3, 2006 I need a function that will allow my to seach throught a file/webpage and get all of the style used.Examples:<style>[GET CODE]</style> and get<Style type="text/css">[GET CODE]</style>If any one could help it would be very nice. Thank you/ Quote Link to comment Share on other sites More sharing options...
Guest footballkid4 Posted April 3, 2006 Share Posted April 3, 2006 [code]<?php$file = "urltoopen.php";if ( $data = file( $file ) ){ $data = join( "\n" , $data ); preg_match_all( "@<style[^>].+?>[^>](.*?)[^>]</style>@ism" , $data , $match ); print_r( $match );}?>[/code]Of course, that won't do much if they use an @import statement or a <link rel="stylesheet"...> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.