PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?PHP
- $browser = new COM("InternetExplorer.Application");
- $browser->Visible = true;
- $browser->Fullscreen = true;
- $browser->StatusBar = false;
- $browser->Navigate("http://www.habrahabr.ru");
- while ($browser->Busy)
- $handle = $browser->HWND;
- $screenWidth = $browser->Width;
- $screenHeight = $browser->Height;
- $documentHeight = $browser->Document->body->scrollHeight;
- $scrollWidth = 20;
- $scrollHeight = 20;
- $testPartSize = 10*1024;
- for($top = 0; $top < $documentHeight; $top += $screenHeight)
- {
- $browser->Document->documentElement->scrollTop=$top;
- while ($browser->Busy)
- echo $browser->Document->documentElement->scrollTop.PHP_EOL;
- for($i = 0; $i < 5; $i++)
- {
- break;
- echo "Bad part, name: {$testFile}, try to generate again.".PHP_EOL;
- }
- $im, $part,
- 0, $top,
- 0, (!$top || ($top + $screenHeight) < $documentHeight) ? 0 : $screenHeight - $scrollHeight - $documentHeight % $screenHeight,
- $screenWidth - $scrollWidth, $screenHeight);
- }
- $browser->Quit();
- * This source code was highlighted with Source Code Highlighter.