Carrying referrer data using php?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DrewKole
    Confirmed User
    • Jul 2001
    • 5193

    #1

    Carrying referrer data using php?

    I was using shtml files and <!--#echo var="QUERY_STRING"-->

    and it was working just fine, but... how do I do the same with php?

    Was using blahblah.html?referrerhere

    Need to use blahblah.php?referrerhere

    Is there a simple way?
  • DrewKole
    Confirmed User
    • Jul 2001
    • 5193

    #2
    Sorry, it didnt take it, but it was the Echo Variable line

    Comment

    • rowan
      Too lazy to set a custom title
      • Mar 2002
      • 17393

      #3
      $_SERVER["REQUEST_URI"] should do the trick, if your URL is:

      http://www.somedomain.com/blah.html?hello

      then that variable will have:

      /blah.html?hello
      Last edited by rowan; 04-20-2003, 01:42 PM.

      Comment

      • rowan
        Too lazy to set a custom title
        • Mar 2002
        • 17393

        #4
        Actually...

        $_SERVER["QUERY_STRING"]

        That will have "hello" in it.

        Comment

        • X37375787

          #5
          or you simply use blah.php?ref=123 and use $ref in your php file.

          Comment

          • SicChild
            Confirmed User
            • Mar 2003
            • 365

            #6
            Originally posted by Equinox
            or you simply use blah.php?ref=123 and use $ref in your php file.
            be safe and use $_GET['ref'] or $_REQUEST['ref']........however as said before $_SERVER['QUERY_STRING'] would return everything after ?

            Comment

            • DrewKole
              Confirmed User
              • Jul 2001
              • 5193

              #7
              Hmm, so... where would I be putting those strings?

              As is, I have every link having the join.shtml?referreridhere

              the html shows join.shtml?[#echo var="QUERY_STRING"]

              and it works pretty well.

              Sorry, Im code stupid... and this board doesnt help by jacking your ability to show it either...

              I've got a dinner engagement, but afterwards if anyone is available on ICQ, I'd really appreciate it.

              Comment

              • cluck
                Confirmed User
                • Dec 2002
                • 5248

                #8
                echo('join.shtml?' . $_SERVER['QUERY_STRING']);


                That should work fine but then again it's 4/20, who knows if what I say works?
                icq 279990726
                www.mcdonalds.com <- great money making opportunity

                Comment

                Working...