![]() |
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 |
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. |
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 |
| All times are GMT -7. The time now is 03:06 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123