1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Redirect Script

Discussion in 'Cloaking and Content Generators' started by BlackHatThomas, Feb 9, 2011.

  1. BlackHatThomas

    BlackHatThomas Newbie

    Joined:
    Feb 9, 2011
    Messages:
    1
    Likes Received:
    0
    Hi guys,

    First I hope this is in the proper section.

    Im using a PHP redirect script for some CPA offers I am promoting via classifieds. What Ive noticed is some of my links seem to loop on certain browsers, specifically IE, & never redirect to the offer. I am definitely losing out on commissions because of this.

    Can anyone recommend a way to solve this issue? Is there a better script out there?

    Here is what I am currently using:

    <?php

    header( 'refresh: 0;' );

    ?>

    Thanks is advance for the help!
     
  2. locknload007

    locknload007 Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 14, 2010
    Messages:
    475
    Likes Received:
    67
    PHP:
    <?php 

    header
    'refresh: 0;' ); 

    ?> 
    That just refreshes the page. You try meta refresh?

    PHP:
    <meta http-equiv="refresh" content="0;url=http://example.com/" />

     
  3. ericsson

    ericsson Elite Member Premium Member

    Joined:
    Apr 25, 2009
    Messages:
    2,642
    Likes Received:
    8,132
    Occupation:
    www
    Location:
    Swe
    Home Page:
  4. CoyoteAssassin

    CoyoteAssassin Elite Member

    Joined:
    Jan 3, 2010
    Messages:
    1,862
    Likes Received:
    3,906
    Occupation:
    Full Time IMer
    Location:
    USA
    Here is my code. It works for me on Firefox and IE.

    <?php
    /* Redirect browser */
    header("Location: http://www.domain.com");
    /* Make sure that code below does not get executed when we redirect. */
    exit;
    ?>
     
  5. blackhattricksbhws

    blackhattricksbhws Registered Member

    Joined:
    Dec 7, 2008
    Messages:
    73
    Likes Received:
    4

    Wow thank you very much. Can you explain exactly how to use the above script? Do I add my affiliate link to every place that says "url"?

    Also what would this page be named? Whatever-i-want.php? html?

    Thanks again & thanks to everyone for your help/suggestions :)
     
  6. blackhattricksbhws

    blackhattricksbhws Registered Member

    Joined:
    Dec 7, 2008
    Messages:
    73
    Likes Received:
    4
    Weird, I tried 8 times to log into BHW with this username & it didnt work so I created a new one with my brothers name & now it logs me back into the original..
     
  7. Volkow

    Volkow Newbie

    Joined:
    Dec 22, 2010
    Messages:
    16
    Likes Received:
    2
    Occupation:
    Web developper
    Location:
    Strasbourg
    Try redirect with javascript.
     
  8. moozig23

    moozig23 Newbie

    Joined:
    Mar 6, 2010
    Messages:
    14
    Likes Received:
    1
    Use "header(Location: ..." instead of "header(refresh...)" and things will work everywhere.