Jump to content

preg_match_all for CSS


maxibwoy

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.