DNS Java Search

I've always had to lookup current status of domain names for clients. Recently I decided why not create my own tools to help with the task.

Live Example http://selflogic.com/domain_tool/

Java documentation. http://docs.oracle.com/javase/7/docs/technotes/guides/jndi/jndi-dns.html#CONF

See the code below.

[More]

screen scrape code (Whois)

An example of a UDF and screen scraper

<form method="get">
	www. <input type="Text" name="string" value="<cfif isdefined('url.string')><cfoutput>#url.string#</cfoutput></cfif>">
	<input type="Submit" value="check this domain">
</form>
<cfif isdefined('url.string')>
	<cfhttp method="get" url="http://www.whois.com/whois/#url.string#"  result="test" resolveurl="true"></cfhttp>
	<cfset thisPage = test.filecontent>
	<cfset scraped = scrape(thisPage, '<div id="registryBlk">', '<div class="whois_rhs_column">', 'Available...')>
	<cfset scraped2 = scrape(scraped, 'Domain Name: ', '<br>','Available...')>
	<cfoutput>
		<hr>#thisPage#
		<hr>#scraped#
		<hr>#scraped2#
	</cfoutput>
</cfif>
<cffunction name="scrape">
	<cfargument  name="searchMe">
	<cfargument  name="startHere">
	<cfargument name="endHere">
	<cfargument name="notfoundmsg" default="">
	<cfset firstNum = Find(startHere, SearchMe)>
	<cfif firstnum eq 0>
		<cfset result = notfoundmsg>
	<cfelse>
		<cfset lastNum = Find(endHere,SearchMe,firstNum)>
		<cfset counting = lastNum - firstNum>
		<cfset result= Mid(searchMe, firstNum, counting)>
	</cfif>
	<cfreturn result>
</cffunction>

Flash detect code

This code is the best way to detect flash. It should work across browsers and even go back to ie6.

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
    function IsFlashInstalled () {
        var info = document.getElementById ("info");
        
            // Internet Explorer supports the mimeTypes collection, but it is always empty
        if (navigator.mimeTypes && navigator.mimeTypes.length > 0) {
            // Firefox, Google Chrome, Safari, Opera
            var mime = navigator.mimeTypes['application/x-shockwave-flash'];
            if (mime && mime.enabledPlugin) {
                var version = mime.enabledPlugin.description;
                info.innerHTML = version + " is installed.";
                return;
            }
        } else {
            if (typeof (ActiveXObject) != "undefined") {
                // Internet Explorer
                try {

var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.1"); info.innerHTML = "Flash is installed."; return; } catch (e) { } } } info.innerHTML = "Flash is not installed."; } </script>

<span id="info"></span>

<script> IsFlashInstalled (); </script>

Special Characters

http://www.webmonkey.com/2010/02/special_characters/

[More]