Isis
19.11.2009, 17:47
http://www.websitescreenshots.com
<?php
$output = exec('cd /d D:\WebServeR\screen\ & webshotcmd.exe /out %h /url "http://forum.antichat.ru" /width 1024 /height 768 /bwidth 1024 /bheight 768 -file 1.txt');
echo $output.'<br/><br/>';
?>
Ошибка:
WebShot v1.7.1.1 > Nathan Moinvaziri // 5.1.2600.1049
out %h /url "http://forum.antichat.ru" /width 1024 /height 768 /bwidth 1024 /bheight 768 -file 1.txt
Navigating web browser [http://forum.antichat.ru]
Document complete []
Error: Unable to get document from frame dispatch
Stopping web browser
Navigation complete
Web browser closed
Из cmd все отлично такой же командой запускается
На сайте что-то написано:
PHP and IIS6
From the php.net website relating to the exec function..
"When trying to run an external command-line application in Windows 2000 (Using IIS), I found that it was behaving differently from when I manually ran it from a DOS prompt.
Turned out to be an issue with the process protection. Actually, it wasn't the application itself that was having the problem but one it ran below it! To fix it, open computer management, right-click on Default Web Site, select the Home Directory tab and change Application Protection to 'Low (IIS Process)'. "
You might also want to create a new Application Pool and set the security account for the application pool from Local Service to Local System and use that.
PHP and Internet Explorer Permissions
Internet Explorer stores the security settings for all users separately. If you run WebShot from the command line you run it as the user you are logged in as, but when you run it from PHP it is run under the SYSTEM user. In certain such instances Javascript will not have the proper permissions to execute when taking a screenshot of a Javascript enabled webpage.
Try adding the following registry values to make Internet Explorer use the HKLM, instead of HKCU security settings.
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\
Windows\CurrentVersion\Internet Settings\
(DWORD) "Security_HKLM_only" = 1
http://support.microsoft.com/kb/182569
Такого пути в реестре нет)
<?php
$output = exec('cd /d D:\WebServeR\screen\ & webshotcmd.exe /out %h /url "http://forum.antichat.ru" /width 1024 /height 768 /bwidth 1024 /bheight 768 -file 1.txt');
echo $output.'<br/><br/>';
?>
Ошибка:
WebShot v1.7.1.1 > Nathan Moinvaziri // 5.1.2600.1049
out %h /url "http://forum.antichat.ru" /width 1024 /height 768 /bwidth 1024 /bheight 768 -file 1.txt
Navigating web browser [http://forum.antichat.ru]
Document complete []
Error: Unable to get document from frame dispatch
Stopping web browser
Navigation complete
Web browser closed
Из cmd все отлично такой же командой запускается
На сайте что-то написано:
PHP and IIS6
From the php.net website relating to the exec function..
"When trying to run an external command-line application in Windows 2000 (Using IIS), I found that it was behaving differently from when I manually ran it from a DOS prompt.
Turned out to be an issue with the process protection. Actually, it wasn't the application itself that was having the problem but one it ran below it! To fix it, open computer management, right-click on Default Web Site, select the Home Directory tab and change Application Protection to 'Low (IIS Process)'. "
You might also want to create a new Application Pool and set the security account for the application pool from Local Service to Local System and use that.
PHP and Internet Explorer Permissions
Internet Explorer stores the security settings for all users separately. If you run WebShot from the command line you run it as the user you are logged in as, but when you run it from PHP it is run under the SYSTEM user. In certain such instances Javascript will not have the proper permissions to execute when taking a screenshot of a Javascript enabled webpage.
Try adding the following registry values to make Internet Explorer use the HKLM, instead of HKCU security settings.
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\
Windows\CurrentVersion\Internet Settings\
(DWORD) "Security_HKLM_only" = 1
http://support.microsoft.com/kb/182569
Такого пути в реестре нет)