PHP Redirect Script

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

Thread Status:
Not open for further replies.
  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 Power Member

    Joined:
    Apr 14, 2010
    Messages:
    504
    Likes Received:
    74
    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,641
    Likes Received:
    8,138
  4. CoyoteAssassin

    CoyoteAssassin Elite Member

    Joined:
    Jan 3, 2010
    Messages:
    1,870
    Likes Received:
    3,942
    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:
    17
    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.
     
Thread Status:
Not open for further replies.