Most Referenced Functions
  » google_pagerank()
  » preg_replace()
  » imagecreatefrompng()
  » site_pageranks()
  » imagepng()
  » imagedestroy()
  » imagestring()
  » imagecolorallocate()
  » htmlentities()
  » preg_match()
  » fopen()
  » header()
  » getimagesize()
  » preg_match_all()
  » session_start()
  » htmlspecialchars()
  » ob_start()
  » ob_flush()
  » strstr()
  » flush()
  » strpos()
  » setcookie()
  » str_replace()
  » array2vars()
  » nl2br()
  » preg_split()
  » ereg()
  » ereg_replace()
  » urlencode()
  » readgzfile()

Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m.

PHP Functions

Function: ssh2_tunnel

(PECL)

ssh2_tunnel --  Open a tunnel through a remote server

Description

resource ssh2_tunnel ( resource session, string host, int port )

Open a socket stream to an arbitrary host/port by way of the currently connected SSH server.

Example 1. Opening a tunnel to an arbitrary host

<?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_pubkey_file($connection, 'username', 'id_dsa.pub', 'id_dsa');

$tunnel = ssh2_tunnel($connection, '10.0.0.101', 12345);
?>

Related Function(s)

  • ssh2_connect()
  • fsockopen()
  • fseek()
  • stream_wrapper_register()
  • stream_get_wrappers()
  • stream_filter_register()
  • stream_get_filters()
  • stream_context_create()
  • fopen()
  • file()
  • file_get_contents()
  • stream_context_set_option()
  • stream_context_set_params()
  • stream_filter_append()
  • stream_filter_prepend()
  • trigger_error()
  • stream_socket_client()
  • stream_socket_server()
  • stream_socket_pair()
  • stream_bucket_append()
  • stream_bucket_make_writeable()
  • stream_bucket_new()
  • stream_bucket_prepend()
  • stream_context_get_default()
  • stream_context_get_options()
  • stream_copy_to_stream()
  • stream_filter_remove()
  • stream_get_contents()
  • stream_get_line()
  • stream_get_meta_data()
  • stream_get_transports()
  • stream_register_wrapper()
  • stream_select()
  • stream_set_blocking()
  • stream_set_timeout()
  • stream_set_write_buffer()
  • stream_socket_accept()
  • stream_socket_enable_crypto()
  • stream_socket_get_name()
  • stream_socket_recvfrom()
  • stream_socket_sendto()
  • stream_wrapper_restore()
  • stream_wrapper_unregister()
  • Icemelon -- PHP, CSS, Javascript Tutorials, & More!
      © 2005-2010 Icemelon.com   Email: dave[AT]icemelon[D0T]c0m