Jump to content

Catch Thumbnail


[dx]

Recommended Posts

Hi there, Is it possible to catch thumbnail of some website with php, or if not, which technics I need to use. In short, something like www.wimg.ca Regards

Link to comment
Share on other sites

The problem is becouse it is not in format URL/filename.jpg, it's only URL. So there's source code

<html>   <body style="margin: 0px;">	<img style="-webkit-user-select: none" src="http://wimg.ca/http://w3schools.com">  </body></html>

If we use file_get_contents(), it will use whole source (<html><body> too) becouse src is same as page.

Link to comment
Share on other sites

$image = file_get_contents("http://wimg.ca/http://www.w3schools.com");file_put_contents('image.jpg', $image);

Fell free to test it.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...