-
Joomla
!
Google
CountLER.
Pekama


:

Fedora core 7 i686 i386 GNU/Linux


 
arrow arrow Internet Explorer  
Internet Explorer
Internet Explorer , : exec("C:\Program Files\Internet Explorer\iexplore.exe").
Internet Explorer` , . .. "" , , - . . rundll32.
, wrlog - log , , , ;-).

:
<?
  //������� �� ������ log`�
  $cfg["epd_ie"]["log_dir"] = "Path\to\log\dir";
  //���������� ������� ��-�������!
  $cfg["epd_ie"]["ie_path"] = "rundll32.exe shdocvw.dll,OpenURL ";
  //prefix �� ������� ��������
  $cfg["epd_ie"]["ie_exe_prefix"] = "cmd /C ";
  //���� ��� ������� IE
  $cfg["epd_ie"]["transfer_timeout"] = 90;
  //url �� �������� � �����
  $cfg["epd_ie"]["url_superput"] = "Path\to\superput.url";
  //url �� �����
  $cfg["epd_ie"]["url_autoget"]  = "Path\to\autoget.url";
  //�������, ��� ����� ���� �� ��������
  $cfg["epd_ie"]["telix_send_local"] = "C:\Telix\Send\";
  //���� IE ������ � (����� � ������ - �� * 60 + ���)
  $cfg["epd_ie"]["receive_start"] = 9   *60  + 15;
  //���� IE ������� �
  $cfg["epd_ie"]["receive_stop"]  = 20  *60  + 30;
  //�������� IE ���� �
  $cfg["epd_ie"]["send_start"]    = 9   *60  + 30;
  //�������� IE ������� �
  $cfg["epd_ie"]["send_stop"]     = 18  *60  + 30;
  //end
?>

:
<?
  include_once("../config.inc.php");
  include_once("../functions.inc.php");

  set_time_limit(0);

  $ld               = $GLOBALS["cfg"]["epd_ie"]["log_dir"];
  $telix_send       = $GLOBALS["cfg"]["epd_ie"]["telix_send_local"];
  $ie_path          = $GLOBALS["cfg"]["epd_ie"]["ie_path"];
  $ie_exe_prefix    = $GLOBALS["cfg"]["epd_ie"]["ie_exe_prefix"];
  $transfer_timeout = $GLOBALS["cfg"]["epd_ie"]["transfer_timeout"];

  $receive_start = $GLOBALS["cfg"]["epd_ie"]["receive_start"];
  $receive_stop  = $GLOBALS["cfg"]["epd_ie"]["receive_stop"];
  $send_start    = $GLOBALS["cfg"]["epd_ie"]["send_start"];
  $send_stop     = $GLOBALS["cfg"]["epd_ie"]["send_stop"];


  $WinShell = new COM("WScript.Shell");

  $start_timestamp = time() - $transfer_timeout + 2;

  wrlog($ld, "������ �������...");

  while(1)
  {
    $cur_timestamp = time();
    $cur_time = (int)(date("H")) * 60 + (int)(date("i"));

    if( ($cur_time >= $receive_start) && ($cur_time <= $receive_stop) )
      $receive_status = 1; else
      $receive_status = 0;

    if( ($cur_time >= $send_start) && ($cur_time <= $send_stop) )
      $send_status = 1; else
      $send_status = 0;

    $delta = $transfer_timeout - ($cur_timestamp - $start_timestamp);
    echo "_" . $delta;
    if($delta == 0) echo "\n";

    //��������
    if($send_status == 1)
    {
      if(($cur_timestamp - $start_timestamp) >= $transfer_timeout)
      {
        $found_file = search_file($telix_send . "\*");
        if($found_file != "") //������ �� �����
        {
          wrlog($ld, "������ ����: " . $found_file);
          echo "\n";

          $start_timestamp = $cur_timestamp;

          //������ IE - �������� � ����
          $exe = $ie_exe_prefix . $ie_path . $GLOBALS["cfg"]["epd_ie"]["url_superput"];
          wrlog($ld, "������ IE �� ��������: " . $exe);
          $WinExec = $WinShell->Run($exe, 0, false);
          //end
        }
      }
    } else
    {
      echo "  " . date("H:i:s") . " " . convert_cyr_string("�������� �������\n", "w", "d");
    }
    //end

    //����
    if($receive_status == 1)
    {
      if(($cur_timestamp - $start_timestamp) >= $transfer_timeout)
      {
        $start_timestamp = $cur_timestamp;

        echo "\n";

        //������ IE - ����
        $exe = $ie_exe_prefix . $ie_path . $GLOBALS["cfg"]["epd_ie"]["url_autoget"];
        wrlog($ld, "������ IE �� ����: " . $exe);
        $WinExec = $WinShell->Run($exe, 0, false);
        //end
      }
    } else
    {
      echo "  " . date("H:i:s") . " " . convert_cyr_string("���� ������\n", "w", "d");
    }
    //end

    //���� ������ �� ����/��������
    if(($cur_timestamp - $start_timestamp) >= $transfer_timeout)
      $start_timestamp = time() - $transfer_timeout + 1;
    //end

    sleep(1);
  }
?>
 

? :



, !


.. . . - . . .., - :-) © 2020.