Copy link to clipboard
Copied
I'm surprised I couldn't find this information myself, but here I am...
When I go to a statistics program like SmarterStats, it's able to show me what ISPs (Time Warner, Cox, Roadrunner, etc) visited the website.
3-part question:
1. Does anyone know of a way (reliable or otherwise) in Coldfusion to capture that same info - not the IP address, but the ISP name?
2. If a college professor visits a website, will it show the ISP as their college, or something generic?
Copy link to clipboard
Copied
There is noting built into CF (or any language that I am aware of) that would do this. You would need to use third-party service.
Do a web search for "ISP Lookup Service" or "GeoIP Service" and you'll likely find what you're looking for.
The only part CF will play in the process is make the request to the service (either a CFHTTP or CF Web Service call) and process the data that is returned.
Jason
Copy link to clipboard
Copied
Oddly, Javascript grabs exactly what I need:
http://javafueled.com/xisp2.php
Now if I could just get CF to grab that info I'd be golden...
Copy link to clipboard
Copied
Really? You think that functionality is built into JavaScript and it's not the third-party service http://www.ip2phrase.com/ that is being called that's doing it?
You could call the service just as easily with CF using CFHTTP, but since that particular service returns an executable JS statement you would need to parse out the pieces that you want.
<cfhttp url="http://www.ip2phrase.com/ip2phrase.asp?template=Looks%20like%20you%20live%20in%20<CITY>." result="response" method="get" />
<cfdump var="#response.filecontent#" />
Copy link to clipboard
Copied
Squiggy2,
I apologize for being so flippant in my response to you last night. Something about your response irritated me and I responded poorly to it.
I hope that the code part of my response was helpful even if my snarkiness was not.
Jason
Copy link to clipboard
Copied
Hi Jason! No problem at all. My reply was a bit of thinking out loud mostly. Seems like as soon as you post something, you think of an answer, but it didn't happen in this instance. I appreciate your response and I'll test out the code when I get a chance. Have a great day.