PDA

View Full Version : need script to know wich country the surfer is from


franko2
03-03-2002, 01:28 AM
I need a script to sort out if the surfer is from US or from other countries to redirect him to the appropriate dialer. Does anybody have an idea where I could find one?<br /><br />Thanks!

michaelw
03-03-2002, 01:35 AM
<a href="http://www.php.net/manual/ro/function.gethostbyaddr.php" target="_blank">http://www.php.net/manual/ro/function.gethostbyaddr.php</a><br /><br />to redirect em, use php's header url function <img border="0" title="" alt="[Big Grin]" src="biggrin.gif" />

franko2
03-03-2002, 02:21 AM
Ya thanks! But Im not a programmer so I need a ready to use script I can just put on my dialer page

1
03-03-2002, 04:37 AM
hit me up on icq!<br />icq # 76678597

Marco
03-03-2002, 05:41 AM
I am very much interested in this too, please contact me.<br /><br />Marco<br />info@codialer.com<br />ICQ 29151164

trip
03-03-2002, 09:44 AM
try <a href="http://www.trixscripts.com/scripts21-30.html" target="_blank">www.trixscripts.com/scripts21-30.html</a><br /><br />script #21 - passport, redirect traffic by their origin of country

Slackman
03-03-2002, 11:48 AM
just search hotscripts.com , plenty of php and perl scripts written for this, but they're all very unreliable.<br /><br />detecting a surfers country based on their host name is very unreliable ( for instance when i'm connected to the internet by @home , my hostname is *.com and I'm living in holland, + many ip adresses don't convert to hostnames)<br /><br />some other scripts try to detect a surfers country by their browser language setting but that's unreliable too.<br /><br />the only way that's reliable is using their ip address and the up to date ip allocation databases from RIPE, ARIN and APNIC.<br /><br />I wrote a very fast script that does that and gets the country right 99.9% of the time.<br />If anybody is interested and willing to pay big $$$ hit me up on icq <img border="0" title="" alt="[Wink]" src="wink.gif" />

trip
03-04-2002, 04:28 PM
emm.. check this out...<br /><a href="http://www.trixscripts.com/scripts21-30.html" target="_blank">www.trixscripts.com/scripts21-30.html</a><br /><br />"21- Exact IP to COUNTRY <br />Redirect traffic from any country to any URL you set based on surfer's IP! (90% accurate)<br />No need for CGI, PHP , server side include.<br />Simply copy the script to your page, set the country or coutries names from a list (included) then set the URL where to send that traffic and let the Script filter your surfer's by their exact country origin!<br />This script uses a unqie method that pin points almost every IP to its location on the globe based on exact IPS database and NOT by ISP/host name!<br />It takes only 1 second to redirect, after your page was loaded."<br /><br />... <img border="0" title="" alt="[Roll Eyes]" src="rolleyes.gif" />

Slackman
03-05-2002, 04:12 AM
I wonder why it is only 90% accurate, and why it takes a full second to redirect.<br />It also doesn't look like it comes with a database, let alone one you could update.<br />It probably does a whois on on arin.net and/or ripe.net or something, that's slow and incomplete.

daveknell
03-05-2002, 04:20 AM
I can't believe that simply using ARIN/APNIC/RIPE WHOIS databases gives anything like 99% accuracy, I'm afraid. Take, for example,<br />AOL: all over the place geographically, but, at least in the UK, the IP blocks they use are allocated to AOL USA from ARIN. 10-15% of the UK market.<br />Demon: the original UK ISP - still has its blocks allocated to Demon US in New York.<br />Us: RIPE (for whatever reason) have us down as being German..<br /><br />Dave

Slackman
03-05-2002, 06:59 PM
Thanks Dave, I didn't know that.<br /><br />I ran a server log through it and it has country info on 99.* % of the IP's and many people tested it and said it gave the correct country, but I never knew this many blocks were allocated to companies in different countries.<br /><br />You can test it here <a href="http://213.174.92.27/test.php" target="_blank">http://213.174.92.27/test.php</a>

Slackman
03-05-2002, 07:07 PM
I checked with your servers IP addresses and they all came back as beeing from GB.

trip
03-06-2002, 04:56 PM
There you go.. :<br /><br /><a href="http://www.trixscripts.com/scripts21-30.html" target="_blank">www.trixscripts.com/scripts21-30.html</a><br /><br />"21- Exact IP to COUNTRY <br />Redirect traffic from any country to any URL based on surfer's IP! (90% accurate)....<br /><br />This script uses a unqie method that pin-points almost every IP to its EXACT location on the globe based on exact IPS database and NOT by ISP/host name nor by ARIN/APNIC/RIPE WHOIS !<br />It takes less then 1 second to redirect surfer, after page was loaded.<br /><br />Easy to install encoded Java Script, just cut and paste".......<br /><br /> <img border="0" alt="[Bounce]" title="" src="graemlins/bounce.gif" />