help with some php coding

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sentry
    Registered User
    • Jul 2005
    • 99

    #1

    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
  • JamesAB
    Confirmed User
    • Jan 2006
    • 188

    #2
    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.
    He who makes a beast out of himself, gets rid of the pain of being a man

    I tried them all in the past year. Chaturbate is the most profitable webcam site to promote

    Comment

    • drjones
      Confirmed User
      • Oct 2005
      • 908

      #3
      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

      Comment

      Working...