I want to read the content of a page (the first page of a site,actually a print-screen of this page) and to write it inside a div.Is there a way for this?
I want to read the content of a page (the first page of a site,actually a print-screen of this page) and to write it inside a div.Is there a way for this?
Do you want the html code or screen shot?
http://code.google.com/p/timthumb/ now supports sccreenshots. It is very easy to create screenshots with this library, only there is some extra server configuration work to run this feature:
Instructions to get website screenshots enabled on Ubuntu Linux:
1. Install Xvfb with the following command: sudo apt-get install subversion libqt4-webkit libqt4-dev g++ xvfb
2. Go to a directory where you can download some code
3. Check-out the latest version of CutyCapt with the following command: svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt
4. Compile CutyCapt by doing: cd cutycapt/CutyCapt
5. qmake
6. make
7. cp CutyCapt /usr/local/bin/
8. Test it by running: xvfb-run --server-args="-screen 0, 1024x768x24" CutyCapt --url="http://markmaunder.com/" --out=test.png
9. If you get a file called test.png with something in it, it probably worked. Now test the script by accessing it as follows:
10. http://yoursite.com/path/to/timthumb.php?src=http://markmaunder.com/&webshot=1