php redirect script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tonkagunner
    Confirmed User
    • Mar 2003
    • 830

    #1

    php redirect script

    I'm looking for a php script that I can plug different urls in to redirect to different place.

    With all these processors going down, I no longer want to submit tgp galleries with processer affiliate link code for fear that processors may go down. I would rather put a link to php page and then put in url in php page. That way I can switch urls if for instance PSW goes down and partner switches to CCbill.

    Anyone know where I can find such a script?
    Traffic Cash Gold
  • tonkagunner
    Confirmed User
    • Mar 2003
    • 830

    #2
    I know I could just link to a html file and do redirect in Apache to other urls, but I'm looking for something better than that.
    Traffic Cash Gold

    Comment

    • KevinX
      Registered User
      • Jun 2003
      • 23

      #3
      tonkagunner,

      This is very simple task to do with PHP since the language give you the option to write headers using the header function. An example of a redirect script in PHP would be as follows

      PHP Code:
      <?php
       header('Location: [url]http://www.yourlinkingcode.com/[/url]');
      ?>
      Because this is outputting an HTML header to the client browser this must be sent before any other output. Make sure that there is no white space (spaces or new lines) before the PHP code starts otherwise the page has already started downloading and headers cannot be sent.

      Regards,
      Kevin

      Comment

      • KevinX
        Registered User
        • Jun 2003
        • 23

        #4
        As you may have noticed the message board automatically switched the URL into a hyperlink so the code is not showing up properly. The line should read as follows:

        header('Location: URL_TO_REDIRECT_TO_GOES_HERE');

        Comment

        • tonkagunner
          Confirmed User
          • Mar 2003
          • 830

          #5
          ahh, I see now. Got it working. Thanks! Would you know of a way to cycle through a list of urls too so that it can go from url 1, next visitor goes to url 2.. etc, etc?
          Traffic Cash Gold

          Comment

          • tonkagunner
            Confirmed User
            • Mar 2003
            • 830

            #6
            It would be kind of interesting to make one of those scripts for join pages in case of downtime. So, if link to ibill shows 401 error or some other error message, it switches to 2nd join link which points to another processor.
            Traffic Cash Gold

            Comment

            • Zer0
              Registered User
              • Aug 2003
              • 16

              #7
              That would be easy enough to do. Before the page sends the location header, open up a connection to grab the wanted url that it's going to, and if you done get a valid responce back then send them else where and repeate the process.

              Comment

              • tonkagunner
                Confirmed User
                • Mar 2003
                • 830

                #8
                I'm guessing some of those traffic scripts like CJultra might do something like that. I think you have to put code into page though, which might get you banned by tgps.
                Traffic Cash Gold

                Comment

                • NiteRain
                  Confirmed User
                  • Jul 2002
                  • 600

                  #9
                  Do you mean something like this:

                  $site_url = array( 'http://www.site1.com' , 'http://www.site2.com');

                  $id = time()%count($site_url);

                  print header("Location: ".($site_url[$id]));


                  Oh forgot to add you can have as many sites in there as you want
                  AIM: PerlScriptor

                  Comment

                  • tonkagunner
                    Confirmed User
                    • Mar 2003
                    • 830

                    #10
                    neato, thanks
                    Traffic Cash Gold

                    Comment

                    • tonkagunner
                      Confirmed User
                      • Mar 2003
                      • 830

                      #11
                      Originally posted by Zer0
                      That would be easy enough to do. Before the page sends the location header, open up a connection to grab the wanted url that it's going to, and if you done get a valid responce back then send them else where and repeate the process.
                      Do you have some code you can post for this?
                      Traffic Cash Gold

                      Comment

                      • ScriptBall
                        Confirmed User
                        • Aug 2003
                        • 376

                        #12
                        I am looking for code work right now as a matter of fact If you want to get a hold of me you can rech me in ICQ 307802876 or Via email [email protected]
                        <table border=0><tr valign=middle> <td><a href=http://www.scriptball.com><img src=http://www.scriptball.com/img/sb_ban_01.jpg border=0></a></td> <td> <font face=arial size=1> <a href=http://www.scriptball.com>Taking the repetitivness out of your job and adding speed to your work. Custom Software in virtually any Unix language, that will save you time and make you money. Take a look! </a> </font> </td> </tr></table>

                        Comment

                        • Kapitan Ivanov
                          Confirmed User
                          • May 2003
                          • 1000

                          #13
                          No.
                          Ivanov:Never posting again. (666)

                          Comment

                          • rammi
                            Confirmed User
                            • Jan 2002
                            • 161

                            #14
                            the easiest is to run some traffic trade script somewhere (no matter on what url) and then add your site into that script (cj ultra, traffic-drive etc.).
                            then you add the link you wanna into that script with some domain.
                            and then you can link the site you want on url
                            https://www.YourSiteWithScriptInstal...mainYouEntered

                            and if you'll need to change the url, you just log into your script and make changes you need.
                            Rammi,
                            create your own Free toplist
                            Trade traffic on Mr. Superporner, The pornstar

                            Comment

                            • nedxxx
                              Confirmed User
                              • Jul 2003
                              • 115

                              #15
                              Best redirection is if you use for example 1minute fetch system (find snoopy in sourceforge.net) and if system fetch ok, than simply redirection like header("Location: {$url_here}");

                              SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.

                              Comment

                              Working...