I am trying to pull a html of a site,
I am using file_get_contents($url)
.
When I run file_get_contents
then its takes too much time pull html of host site, Can I skip style, scripts and images ?
I think then it will take less time to pull html of that site.
Try:
$file = file_get_contents($url);
$only_body = preg_replace("/.*<body[^>]*>|<\/body>.*/si", "", $file);