| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 55767 | 2005-03-19 03:37:00 | PHP GD help needed | Gordo (7646) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 335664 | 2005-03-19 03:37:00 | Hi there, I've looked around on a number of script boards but haven't found one that does what I want it to. Is there someone here that could help me find/write a script that takes a URL as an input parameter and output a thumbnail of the web page at that URL ? I've found heaps of tutorials that demonstrate conversion from one bitmap type to jpg, etc, but none that do an HTML to jpg conversion. Would appreciate it if someone could point me in the right direction. Thanks, Gordo. |
Gordo (7646) | ||
| 335665 | 2005-03-19 04:33:00 | Well you can certainly grab the HTML and there are parsers to get text out of it but in your case the only thing I can see to do is to instruct a browser to load the address and to then take a screenshot of the window (or print to PDF). On Windows you could either control something like Internet Explorer with COM see php ref (www.php.net) and then execute another utility to take a screenshot and then save the iamge and resize etc. Or you could just use a scripting language on windows such as Autoit and just have PHP execute that passing the URL for the browser to load. Does a dump of the Lynx browser output count as thumbnail of the web page :D ? |
gibler (49) | ||
| 335666 | 2005-03-22 07:01:00 | No go Joe! I think you'll find that this cannot be done.. Easily. You need a client to view the webpages, a server is.. A server. I've never seen this done with PHP/GD or any other web-programming-language being run on a server. However, you can get a program for Windows called "HTML to Image" - This software reads a list of URLS that you supply and creates screenshots of the pages found.. It's very easy to use. After it's don, all you need to do is FTP the images/data to your server and *poof* you're dancing. :) |
l0gic (6781) | ||
| 335667 | 2005-03-22 13:18:00 | I don't know why people would think this is hard. I may write the script up. Hint: You are thinking about binary images, I am not. So if anyone else would like to attempt this too, be my guest but I'll just do it as a hobby project, so it may take a while to get completed, if I do finish it, it'll be released GPL and I will tell you where you can grab it from. Cheers, KK |
Kame (312) | ||
| 1 | |||||