如何使用PHP从浏览器的地址栏复制URL /链接? [英] How do I copy a url/link from a browser's address bar using PHP?

查看:142
本文介绍了如何使用PHP从浏览器的地址栏复制URL /链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个产品推广网站,其中关联公司将注册以推广产品。每个会员在注册时都会有一个唯一的ID,每个会员将使用一个链接,其中包括他的联盟会员,以指导客户到产品订单页面。我需要一种方法来捕获联盟ID以进行进一步处理,我正在考虑如何获取我的PHP代码链接并从中提取联盟ID。有什么想法吗?

I am building a product promotion site where affiliates will register to promote products. Each affilite will have a unique ID on registering and each affiliate will use a link which include his affiliate to direct custumers to product order page. I need a way to capture the affiliate ID for further processing and I am thinking of how to get the link into my PHP code and extract the affiliate ID fro it. Any ideas?

推荐答案

我建​​议您查看


_SERVER数组的内容。



(使用类似



_SERVER array.

(use something like

<?php   print_r(


_SERVER);??>
_SERVER); ??>





查看这个数组中的各种值并确定哪一个对你有好处。



另一种选择是使用javaScript和位置。(各种东西)并将其传送到服务器(如何取决于你想用它做什么)。



Look at the various values in this array and decide which one is good for you.

Another option is to use javaScript and the location.(various stuff) and transmit that to the server (how depends upon what you wish to do with it).


这篇关于如何使用PHP从浏览器的地址栏复制URL /链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆