frankmorrison
asked on
Can PHP do port forwarding?
I have a client/server application. The client application connects to the server on port 2356 like this: connect http://www.myserver.com:2356. The server also has an IIS web server listening on port 80 with PHP installed.
I would like to create a PHP port forwarder script that will allow my client application to connect using port 80 like this: connect http://www.myserver.com/portfowarder.php
The portfowarder.php script will act like a standard tcp/ip port fowarder connecting whatever is sent to the server application listening on port 2356.
I am not an expert PHP person, so please try to be very specific. Sample working code preferable.
I would like to create a PHP port forwarder script that will allow my client application to connect using port 80 like this: connect http://www.myserver.com/portfowarder.php
The portfowarder.php script will act like a standard tcp/ip port fowarder connecting whatever is sent to the server application listening on port 2356.
I am not an expert PHP person, so please try to be very specific. Sample working code preferable.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<?php
header("Location: http://".$_SERVER['HTTP_HOST'].":
?>
It does require the the client application to have full HTTP implementation, but you'll just have to test it to find out.