Zubrag.com
August 25, 2019, 11:19:14 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: I need help with your webthumb script  (Read 15266 times)
ABuhrdorf
Newbie
*
Posts: 4


« on: March 13, 2007, 07:09:33 AM »

Hello all,

i'm using your Script to display Thumbnail Images in my webdirectory. But there is one big problem: If an Thumshot could not be retreived, IECapt.exe is not terminating and continues to get a Thumbshot from this side, until my Server quites its work, because its only allowed to start 60 processes at the time.

I need a solution that the script will cancel the Atempt for getting a thumbshot after 10 seconds and kills IECapt. Can you help me in this Issue?

Regards

Armin

Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #1 on: March 13, 2007, 07:29:10 AM »

Currently I can think of setting application timeout in registry, like this

HKEY_CURRENT_USER\Control Panel\Desktop -> HungAppTimeout

Change the value to the new timeout value, and reboot. But i think this can cause troubles, because other applications could be affected. Not sure though.

php has set_time_limit statement, but i think it would kill only php script itself, not the process called via exec.

From microsoft.com:
The time-out limit is five minutes for versions 4.0 and 4.01 and is 60 minutes for versions 5.x and 6. As a result, Internet Explorer does not wait endlessly for the server to come back with data when the server has a problem.

To add timeout for Internet Explorer 1.01 and later update registry:
1.   Add a ReceiveTimeout DWORD value with a data value of (<number of seconds>)*1000 in the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
For example, if you want the timeout duration to be 8 minutes, set the ReceiveTimeout data value to 480000 (<480>*1000).
2.   Restart your computer.
Logged
ABuhrdorf
Newbie
*
Posts: 4


« Reply #2 on: March 13, 2007, 10:03:17 AM »

I found another Screencapture Program, but i have to change the parameters in your Script. Can you help me todo this. I always get an error, because the syntax is to use '='.

Here is the required syntax:
h2icmd.exe /u=http://www.sysimage.com /i=c:\sysimage.jpg /t=c:\sysimage_small.jpg /w=300

Regards

Armin
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #3 on: March 13, 2007, 10:33:47 AM »

Replace this
  @exec('IECapt.exe ' . escapeshellarg($website_url) . ' ' . escapeshellarg($cached_filename));

with
  @exec('h2icmd.exe /u= ' . escapeshellarg($website_url) . ' /i=' . escapeshellarg($cached_filename) . '_big /t=' . escapeshellarg($cached_filename) . ' /w=300');

did not test it. Cannot find the h2icmd.exe on the net?!?   

But found webshotcmd.exe (http://www.websitescreenshots.com). Will look at how it could be implemented.
Logged
ABuhrdorf
Newbie
*
Posts: 4


« Reply #4 on: March 13, 2007, 10:44:17 AM »

No, it doesn't work. I added these lines to the script an at least it stops after a few seconds and shows ma a coming soon image.

$arg_url = '/u=';
$arg_file = '/t=';
$arg_size = '/w=400';

 @exec('h2icmd.exe '  .escapeshellarg($arg_url) .escapeshellarg($website_url) .escapeshellarg($arg_file) .escapeshellarg($cached_filename) .escapeshellarg($arg_size));
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #5 on: March 13, 2007, 10:50:25 AM »

added spaces between parameters

@exec('h2icmd.exe '  .escapeshellarg($arg_url) .escapeshellarg($website_url) .' '.escapeshellarg($arg_file) .escapeshellarg($cached_filename) .' '. escapeshellarg($arg_size));

Where did you find h2icmd.exe?  Could you post url?
Logged
ABuhrdorf
Newbie
*
Posts: 4


« Reply #6 on: March 13, 2007, 10:53:53 AM »

NOW IT WORKS !!!

Many thanx ! :-)
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC