11th of November 2020 - CPAElites is for sale! As a result of the 4th CEO absence in 2020 (for months): Please click [here] to read more!


Redirect user based on certain ISP
2017-11-27, 11:05 PM,
#1
Hello guys, there are any javascript or similar code that can detect and redirect users with only certain ISP?
Reply
2017-11-28, 05:19 AM,
#2
here you go, i just wrote you a quick example in php:

Code:
<?php
   // quick redirect example by styx@argo-content.com
   function rdns_check($isp,$url) {
      $host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
      if(stristr($host,$isp)) {
         header("Location: $url");
         exit;
      }
   }
   rdns_check("your-isp2match.com","https://argo-content.com");
?>

just typed it in here directly, but should work :)
Reply
2017-11-28, 07:48 PM,
#3
(2017-11-28, 05:19 AM)styx Wrote: here you go, i just wrote you a quick example in php:

Code:
<?php
  // quick redirect example by styx@argo-content.com
  function rdns_check($isp,$url) {
     $host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
     if(stristr($host,$isp)) {
        header("Location: $url");
        exit;
     }
  }
  rdns_check("your-isp2match.com","https://argo-content.com");
?>

just typed it in here directly, but should work :)

WOW thanks for the code man. I didn't have the idea that we can do that too.
Reply
2017-11-28, 07:49 PM,
#4
(2017-11-28, 05:19 AM)styx Wrote: here you go, i just wrote you a quick example in php:

Code:
<?php
  // quick redirect example by styx@argo-content.com
  function rdns_check($isp,$url) {
     $host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
     if(stristr($host,$isp)) {
        header("Location: $url");
        exit;
     }
  }
  rdns_check("your-isp2match.com","https://argo-content.com");
?>

just typed it in here directly, but should work :)

Thank's, but I don't understand where I need to put the "operator name"? I need to go to certain url when the code detected users with one specific carrier.
Reply
2017-11-28, 08:11 PM,
#5
just replace "your-isp2match.com" with the name of your isp that you want to match and https://argo-content.com with the url you want to redirect to.
Reply


Related Threads
Thread Author Replies Views Last Post
  How to redirect user after completing survey with cpa build mathewocomy 1 231 2020-06-16, 02:31 AM
Last Post: DrKent
  How Redirect Locker based on ip address ? ned02 1 373 2020-05-18, 03:53 PM
Last Post: Antonio
  How to grow a theme based snapchat account? schausnegl 0 197 2020-02-11, 07:51 PM
Last Post: schausnegl
  Is it too hard to make a offer site that pay user to do offer? 5light 3 536 2019-04-25, 05:30 PM
Last Post: Borislav
  which better to rank with 40 DA domain redirect the domain 301 kr0smx 3 564 2019-01-02, 02:34 PM
Last Post: kr0smx





About Us | Contact Us | CPAElites | Advertise | Stats

Copyright © 2013 - 2020 by (company to be announced later)
Temporarily (!) powered by MyBB, fixed (repaired) and enhanced by Charlie Harper (GitHub) aka Charles Francis Harper (Wikipedia)
Return to top
This forum uses Lukasz Tkacz MyBB addons.