I am beginning to use the Perl commands SOCKET, BIND, and CONNECT to establish a connection to another website. What I do is set SOCKET appropriately, set BIND to my server name, and then set CONNECT to the website I want to connect to. It all seems to work perfectly.
Now I have a CGI Perl script called Getgraphic.CGI. My website has an IMG tag which calls this script (<img src="http://www.mysite.com/cgi-bin/getgraphic.cgi
">). Now I realize that a browser like Netscape must do the same procedure with the Socket, Bind, and Connect so as to make a connection to my CGI script. Therefore when my CGI script begins to run a SOCKET path has been established to the client so that data can flow to and from.
What I would like to do is instead of my GetGraphic.CGI to output its image graphics I would like to "map" this existing socket connection to another server's CGI script for it to output its image graphics, all from within my GetGraphics.CGI. Is there any way to do this? Perhaps altering BIND (the command which took in my server name)?