一段asp程序用php应该如何写

WBOY
Release: 2016-06-13 13:32:06
Original
706 people have browsed it

一段asp程序用php应该怎么写
login_Url=""'初始化网址
LoginIPArea=""'初始化客户端ip区域
login_Url= Request.ServerVariables("HTTP_REFERER") '获取客户端ip来源地址
nextpage="<script>location.href='p_center.asp';</script>"'定义跳转的页面
' response.write login_Url
'response.end
if len(login_Url)>0 then '来源url的处理过程
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") '获取客户端ip
If IP = "" Then IP = Request.ServerVariables("REMOTE_ADDR") 'ip地址处理
' IP=getIP()
LoginIPArea=GetIpArea(IP)

------解决方案--------------------
$login_Url="";//初始化网址
$LoginIPArea="";//初始化客户端ip区域
$login_Url= $_SERVER["HTTP_REFERER"];//获取客户端ip来源地址
$nextpage="<script>location.href='p_center.asp';</script>";//定义跳转的页面
// echo $login_Url
//exit
if(strlen($login_Url)>0){//来源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"];// '获取客户端ip

if($IP == "")
$IP = $_SERVER["REMOTE_ADDR"];// 'ip地址处理

//IP=getIP()
$LoginIPArea=GetIpArea($IP);

Related labels:
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