Results 1 to 4 of 4

Thread: PHP Redirect issue

  1. #1
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts

    PHP Redirect issue

    What would be the coded that would be needed to redirect a user and still show its refer?

    I am bouncing unwanted traffic off my proxy sites and sending them to my proxy list. Now in my proxy list the visitor counts are increasing but when I look at the refer links its not showing the sites I would have to say it showing as direct type in.

    I am assuming the script needs to return the refer header but I cant seem to find any that work or do this.

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  2. #2
    Nathan's Avatar
    Nathan is offline Work!
    Join Date
    Dec 2008
    Location
    New Zealand
    Posts
    392
    Blog Entries
    1
    Thanks
    37
    Thanked 120 Times in 68 Posts
    You must be using a meta refresh or something like that which is blanking the referrer. You want some thing like below to keep the referrer.

    Code:
    <?php
    
    header("Location: http://www.mywebsite.com");
    
    ?>
    Programmer, web developer and entrepreneur.

  3. #3
    Come's Avatar
    Come is offline Building a Twitter Empire
    Join Date
    Dec 2008
    Location
    Martinique, FWI
    Posts
    321
    Blog Entries
    6
    Thanks
    27
    Thanked 44 Times in 37 Posts
    Beware of security !

    Code:
    <?php
    
    header("Location: http://www.mywebsite.com");
    exit;
    
    ?>
    Hackers can't stop the redirection now.
    Thanks

  4. #4
    LogicFlux is offline Newbie Net Builder
    Join Date
    Dec 2008
    Posts
    47
    Thanks
    13
    Thanked 17 Times in 17 Posts
    The referer header is set by the client so you can't do it through php.
    This seems like a pretty good solution.


    Code:
      print "<html><head><title>redirect</title><meta http-equiv=\"Refresh\" content=\"0; URL=$url\"><head><body onLoad=\"javascript: window.location='$url';\">$url</body></html>";
    Where $url is where you want to redirect to.

    That will allow the url of the script that does the redirecting to show up as the referer.

Similar Threads

  1. www and non www url issue
    By 1901gt in forum Managing
    Replies: 5
    Last Post: 20 April, 2009, 19:42 PM
  2. [WTH] Repair css IE/FF issue
    By Mr.Bill in forum Services
    Replies: 3
    Last Post: 25 February, 2009, 18:41 PM
  3. Need some help with a CSS issue
    By Mr.Bill in forum Programming
    Replies: 5
    Last Post: 16 December, 2008, 19:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •