I'm not sure about directly creating this script from scratch but perhaps there might be an api that you can use. So try and google for a webpage screen capture api.
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 260
Skill Endorsements: 13
hit print screen! :twisted:
Chortle! Nice one.
Thumbshots.org have a service. The imagegrab..() functions work with Windows (and only IE - *I think*). I could never get it to work. I always thought that getting a screenshot from an url was a big 'no-no', as it usually got info from the client's browser - this would pose a pretty horrible security risk.
This could mean that a site could get my active window or desktop screenshot. Gawd, how would I explain that in my necrophiliacs anonymous sessions?
diafol
Keep Smiling
10,654 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,510
Skill Endorsements: 57
hi <?PHP
$image = "http://images.websnapr.com/?size=s&url=$url";
echo "<img src=\"$image\" width=\"202\" height=\"152\" alt=\"Screen Shot.\">";
?>
this is not working now any idea about new code..??????????
hi, please use lower case <?php and that should solve your problem. :)
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 260
Skill Endorsements: 13
Check the code of timthumb script:
http://timthumb.googlecode.com/svn/trunk/timthumb.php
I never tried that but it gives the ability to create screenshots of websites, you will need access to the command line of your webserver, in shared hostings this may not be possible. Bye.
cereal
Veteran Poster
1,145 posts since Aug 2007
Reputation Points: 344
Solved Threads: 222
Skill Endorsements: 22
Hi,
Try this,
<?php
## define your url
## change comments tags to the proper syntax as recommended by php.net.
## unless you are a developer, you can give reason why these ## are valid.
## even if the rest of the world would argue that it is wrong,
## it does not mean it is not valid.
$url = "http://www.daniweb.com/web-development/php/threads/256243";
echo '<img src="http://open.thumbshots.org/image.aspx?url='.$url.'" width = "150" height = "150" />';
?>
That's exactly what I proposed and took this many posts to work that out.
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 260
Skill Endorsements: 13