php如何获取用户登录网站使用的端口

WBOY
Release: 2016-06-23 14:14:50
Original
2667 people have browsed it

端口 服务器端口 用户端口

标题:
php如何获取用户登录网站使用的端口
或者说
php如何获取用户连接到服务器时所使用的端口

内容 ***************************************************

在百度中查到说是用  $_SERVER['REMOTE_PORT'] 函数可以获取端口,我在本地php环境试了一下在我们登录或退出能获取我的端口,但是我东西移到我的服务器上,就获取不到,就大虾们帮忙解决下!感激不尽!!!






回复讨论(解决方案)

服务器是windows  iis服务

这个是不是地址中有端口才能获取端口啊,服务器上一般都是80端口,是默认的。

你说的是客户端的端口,还是服务器端口?

是网监需要
要求网站记录用户登录和退出的ip和端口!!!

肯定不是80端口了,是用户访问服务器的端口,这个数是不停在变的

php 在低版本的 IIS 中是没有 $_SERVER['REMOTE_PORT'] 的(window 2008 + IIS7.5 中有)
你需要在微软官网下载 REMOTE_PORT 相关补丁

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!