PDA

Просмотр полной версии : WebShot


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

Такого пути в реестре нет)

Mysterious
19.11.2009, 21:53
у меня все ок.


<?php
$output = exec('cd /c C:\Program Files\WebShot\ & webshotcmd.exe /out %h /url "http://forum.antichat.ru" /width 1024 /height 768 /bwidth 1024 /bheight 768 -file 1.txt');
echo $output.'<br/><br/>';
?>


1.txt


WebShot v1.7.1.1 > Nathan Moinvaziri // 6.0.6002.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 [Форум АНТИЧАТ - безопасность WEB - интерфейсов]
Document meta keywords [forum,bbs,discussion,antichat, форум, hack]
Document meta description [This is a discussion forum by Antichat.ru. Официальный форум АНТИЧАТ.РУ]
Saving web page image [C:\Program Files\VertrigoServ\www\forum.antichat.ru.jpg 1024x768]
Stopping web browser
Navigation complete
Web browser closed


Снимок нормальный в папке www.

ЗЫ юзал VertrigoServ + путь прописывал к корню программы, а не чисто к папке с отдельным webshotcmd.exe

ЗЫ2 действительно в реестре нет записи

все работает

http://img338.imageshack.us/img338/5885/forumantichatru.th.jpg (http://img338.imageshack.us/i/forumantichatru.jpg/)

Isis
20.11.2009, 07:05
Какой Service pack стоит? У меня второй просто...и какой ие?

Mysterious
20.11.2009, 07:16
Какой Service pack стоит? У меня второй просто...и какой ие?

у меня вообще виста sp2 ) вирт сервер VertrigoServ 2.20
Браузер - в любом пашет, а так именно Internet Explorer 8.01 хотя пашет и в опере :)

Isis
20.11.2009, 15:56
Программа по дефолту юзает ие, не?

Isis
20.11.2009, 16:01
cd /d C:\Program Files\WebShot
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

Даже так...

b3
21.11.2009, 18:55
Второй день немогу вспомнить где видел, но есть либа или скрипт, который выполняет данную функцию, и не прийдеться юзать exec() и вин-приложение.