How to write login_Url & quot; for an asp program using php to initialize LoginIPArea & quot; initialize login_UrlRequest.ServerVariables (& quot; HTTP_REFERER & quot;) in the client ip area ;) obtain the client ip address nextpage & quot; & lt; script & how to write an asp program using php
Login_Url = "" 'initialize the URL
LoginIPArea = "" 'initialize the client ip area
Login_Url = Request. ServerVariables ("HTTP_REFERER ")'
Nextpage = "script location. href = 'p _ center. asp '; script"' defines the page to jump.
'Response. write login_Url
'Response. end
If len (login_Url)> 0 then' source url processing process
Login_Url = replace (login_Url, "http ://","")
Login_Url = split (login_Url ,"/")
Login_Url = login_Url (0)
End if
Isvalid = 1
Validcount = 0
Logincount = 0
Vipurl = request ("vip ")
IP = Request. ServerVariables ("HTTP_X_FORWARDED_FOR") 'get the client ip address
If IP = "" Then IP = Request. ServerVariables ("REMOTE_ADDR") 'IP Address processing
'IP = getIP ()
LoginIPArea = GetIpArea (IP)
------ Solution --------------------
$ Login_Url = ""; // initialize the URL
$ LoginIPArea = ""; // initialize the client ip area
$ Login_Url = $ _ SERVER ["HTTP_REFERER"]; // Obtain the client ip address source address
$ Nextpage = "script location. href = 'p _ center. asp '; script"; // defines the page to jump.
// Echo $ login_Url
// Exit
If (strlen ($ login_Url)> 0) {// process the source url
$ Login_Url = str_replace ("http: //", "", $ login_Url );//
$ Login_Url = explode ("/", $ login_Url );//
$ Login_Url = $ login_Url [0];
}
$ Isvalid = 1;
$ Validcount = 0;
$ Logincount = 0;
$ Vipurl = $ _ GET ["vip"];
$ IP = $ _ SERVER ["HTTP_X_FORWARDED_FOR"]; // 'get the client ip address
If ($ IP = "")
$ IP = $ _ SERVER ["REMOTE_ADDR"]; // 'IP Address processing
// IP = getIP ()
$ LoginIPArea = GetIpArea ($ IP );