$ASPservername : This variable must have an IP in the
/etc/hosts file.
$ASPport : ASP file server port number.
$ ASPpath : ASP file path on the server side.
$ASPfile : ASP file name
$ASPurlredirect: $ASP file parameters.
//Set variable
$ASPservername = "WEB_SQLSERVER";
$ASPport = 80;
$ASPpath = "/development/sqlserver/";
$ASPfile = "storedprocs.asp?";
$ASPurlredirect = "clienthostpage=" .strstr($SCRIPT_NAME, "/");
//Connect to IIS/ASP server
$fp=fsockopen($ASPservername, $ASPport, &$errno, &$errstr);
if($fp) {
//GET mode to server
$sRequest = "GET ".$ASPpath.$ASPfile;
$sProtocol=" HTTP/1.0 nn";
if (!strlen(chop($QUERY_STRING))){
$httpget=$sRequest.$ASPurlredirect.$sProtocol;
} else {
$httpget=$sRequest.$QUERY_STRING.$ sProtocol;
!feof($fp)) {
$line=fgets($fp,128);
//Display ASP file return results
if ($bTripped){
echo $line ; } Else {
// Treatment of IIS header information
$ BTRIPPD = Strstr (StrToupper ($ line), "& lt; html & gt;");
if ($ btripped) echo $ line;
;
http://www.bkjia.com/PHPjc/315914.html
www.bkjia.com
true
http: //www.bkjia.com/PHPjc/315914.html
TechArticle