|
|
|
Check for fishing site using Classic ASP
1
This asp code send a request to google to test if a domain is a fishing site. Copy the code and save it to IIS as an asp file. For example, if you file is http://localhost/fishing.asp, and if you want to test if yahoo.com is a fishing site, type http://localhost/fishing.asp?site=yahoo.com
<%
Function GetPage(domain)
Dim oXMLHttp
Dim sXML
URL="http://clients1.google.com/complete/search?client=chrome&hl=en-GB&q=http%3A%2F%2F" & domain
GetPage=""
Set oXMLHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
oXMLHttp.open "GET", URL, false
oXMLHttp.send()
if oXMLHttp.status = 200 Then
GetPage = oXMLHttp.responseText
end if
set oXMLHttp = nothing
end function
%>
<script type="text/javascript">
a=<%=GetPage(Request("site"))%>;
if(a[4]["google:suggesttype"][0]=="NAVIGATION") alert("Site is Normal");
else alert("This is a fishing site");
</script>




There are currently no comments for this snippet.