maxibwoy Posted June 11, 2011 Share Posted June 11, 2011 Hi, I'm using curl to scrape web pages and as the website I'm scraping has a frame buster script I need to preg_match the body like this preg_match("%<body.*?>(.*?)</body>%s", $raw, $match); $data['body']=$match[1]; and then, what I cannot figure out how to do, I would need to preg_match_all every stylesheet and inline css in the <head> and reoutput them all out like the body. But I cannot manage to get it to work. Any ideas? Thanks! Max Link to comment https://forums.phpfreaks.com/topic/239066-preg_match_all-for-css/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.