& Lt ;? & Nbsp; $ aspservername: this variable must contain ip addresses in the & nbsp; etchosts file. & nbsp; $ ASPport: ASP file server port number. & nbsp; $ ASPpath: ASP file path on the server side. & nbsp; & nbsp
$ Aspservername: this variable must have an ip address in
In the/etc/hosts file.
$ ASPport: ASP file server port number.
$ ASPpath: The ASP file path on the server side.
$ ASPfile: ASP file name
$ ASPurlredirect: $ ASP file parameters.
// Set variables
$ ASPservername = "WEB_SQLSERVER ";
$ ASPport = 80;
$ ASPpath = "/development/sqlserver /";
$ ASPfile = "storedPRocs. asp? ";
$ ASPurlredirect = "clienthostpage =". strstr ($ SCRIPT_NAME ,"/");
// Connect to the IIS/ASP server
$ Fp = fsockopen ($ ASPservername, $ ASPport, & $ errno, & $ errstr );
If ($ fp ){
// GET mode to server
$ SRequest = "GET". $ ASPpath. $ ASPfile;
$ SProtocol = "HTTP/1.0 \ n ";
If (! Strlen (chop ($ QUERY_STRING ))){
$ Httpget = $ sRequest. $ ASPurlredirect. $ sProtocol;
} Else {
$ Httpget = $ sRequest. $ QUERY_STRING. $ sProtocol;
}
// Send a request from the client to the ASP file
Fputs ($ fp, $ httpget );
// Process the returned results
While (! Feof ($ fp )){
$ Line = fgets ($ fp, 128 );
// Display the results returned by the ASP file
If ($ bTripped ){
Echo $ line;
} Else {
// Process IIS header information
$ BTripped = strstr (strtoupper ($ line ),"");
If ($ bTripped) echo $ line;
}
}
Fclose ($ fp );
} Else {
Echo "$ errstr ($ errno)
\ N ";
}
?>