Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Szukam] Darmowego hostingu z SSH
Heniut
post
Post #1





Grupa: Zarejestrowani
Postów: 54
Pomógł: 0
Dołączył: 22.07.2011

Ostrzeżenie: (0%)
-----


Jak w temacie szukam hostingu na którym będę mógł użyć takiego kodu:
  1. <?php
  2. $server = "--";
  3. $username = "--";
  4. $password = "--";
  5.  
  6. $methods = array('kex' => 'diffie-hellman-group1-sha1');
  7.  
  8. $connection = ssh2_connect($server, 22, $methods);
  9. ssh2_auth_password($connection, $username, $password);
  10. $shell = ssh2_shell($connection);
  11. $cmd = "sh fileset.sh";
  12. $output = user_exec($shell,$cmd);
  13.  
  14. echo $output;
  15.  
  16. function user_exec($shell,$cmd)
  17. {
  18. fwrite($shell, $cmd . "\r");
  19. sleep(1);
  20. while($line = fgets($output)){
  21. flush();
  22. $tab[]= $line;
  23. }
  24. fclose($shell);
  25. }
  26. ?>

I nic więcej smile.gif
1Gb transferu spokojnie starczy smile.gif
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 13:19