|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
|||||||
| New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
|
Thread Tools |
|
|
#1 |
|
Registered User
Join Date: Jul 2005
Posts: 99
|
help with some php coding
Hi, I am looking for some help coding a bit of php for my site.
I am a bit of a php noobie and am struggling to write the code I need to do a simple task. I want to set it up on my paysite so that traffic that I send to my paysite from my free sites goes to a different CC biller than traffic sent from my affilaites. I know I could just make a clone of my existing index.php page and call it index2.php and send all the traffic from my free sites to there but I want one entry page to the site that can dynamically change the join link depending where the traffic came from so that I only need to make changes in one place when updating the site. EG Traffic from my freesites goes to www.mydomain.com/index.php?id=free and the join links all point to CC biller 1 And traffic from my affilaites or url type ins going to www.mydomain.com or www.mydomain.com/index.php then the join links point to CC biller 2 Can anyone who is good with php help me? I know it needs if and else statements and will probably involve sessions as the site tour is multiple pages but i don't know how to put it all together
__________________
Topless Babez cash - Great teen sites to promote with exclusive content. Online since 2004 Topless Babez trades - 16 teen traffic trade sites with quality traffic |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Jan 2006
Posts: 188
|
One solution would be to set a cookie each time "id=free" is present in the URL.
Then have your script check for the cookie. If the "free" cookie is set, send traffic to biller #1. If the "free" cookie is not set, send traffic to biller #2. |
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Oct 2005
Location: Charlotte, NC
Posts: 908
|
You can also use the built in variable $_SERVER['HTTP_REFERER']. In most cases, that will tell you the domain of the site the user is coming from. If they come from your free site, display the appropriate form.
Since neither of the methods JamesAB and I are talking about are 100% reliable, a little redundancy never hurts anyone so it might be good to run with them both and check for either of those conditions
__________________
ICQ: 284903372 |
|
|
|