rafaelsilvadaniel

tarefa agendada everest01

Jun 17th, 2021
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: sfrade
  5. * Date: 24/04/2018
  6. * Time: 15:17
  7. */
  8. // LOCAL: php C:\inetpub\wwwroot\everest3\cron-30.php
  9. // Everest01: php C:\inetpub\wwwroot\everest\cron-30.php
  10. // Everest02: php C:\inetpub\wwwroot\everest\cron-30.php
  11. // HMG: php C:\inetpub\wwwroot\everest3\cron-30.php
  12. @include_once( 'C:\inetpub\wwwroot\everest3\application\helpers\custom_functions.php' );
  13. @include_once( 'C:\inetpub\wwwroot\everest\application\helpers\custom_functions.php' );
  14. $urls = [
  15. (object) [
  16. 'url' => 'http://localhost/everest3/webservice/atualiza_funcionarios',
  17. 'COMPUTERNAME' => 'POSITIVO',
  18. ],
  19. (object) [
  20. 'url' => 'http://everest.fapemig.br/webservice/atualiza_funcionarios',
  21. 'COMPUTERNAME' => 'EVEREST',
  22. ],
  23. (object) [
  24. 'url' => 'http://everest.fapemig.br/statusservidor/atualizar',
  25. 'COMPUTERNAME' => 'EVEREST',
  26. ],
  27. (object) [
  28. 'url' => 'http://localhost/everest3/webservice/bolsavinculada_files_all',
  29. 'COMPUTERNAME' => 'POSITIVO',
  30. ],
  31. (object) [
  32. 'url' => 'http://everest.fapemig.br/webservice/bolsavinculada_files_all',
  33. 'COMPUTERNAME' => 'EVEREST',
  34. ],
  35. ];
  36. //echo $_SERVER['COMPUTERNAME'];
  37. foreach ( $urls as $url ) {
  38. if ( containsInString( $_SERVER['COMPUTERNAME'], $url->COMPUTERNAME, false )
  39. or $url->COMPUTERNAME == null ) {
  40. file_get_contents( $url->url );
  41. }
  42. }
Add Comment
Please, Sign In to add comment