Home > Backend Development > PHP Tutorial > ASP Firewall for PHP_PHP Tutorial

ASP Firewall for PHP_PHP Tutorial

WBOY
Release: 2016-07-21 16:04:25
Original
1353 people have browsed it


$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

? $ASPservername: This variable must have an IP in the /etc/hosts file. $ASPport: ASP file server port No. $ASPpath: ASP file path on the server side. $ASPfile: ASP file name $ASPurlredirect...

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template