Category Archives: Web Tools

ASP File_Get_Contents and File_Put_Contents

As I've become more of a PHP developer than an ASP developer, one thing I've noticed is that it is 10x easier to read/write text files with PHP. Simply use file_get_contents() and be done. ASP isn't so nice. But it can be done, so I'm creating those for simplicity here:

Function File_Get_Contents(strFile)
	' Remote File
	If Left(strFile, 7) = "http://" Or Left(strFile, 8) = "https://" Then
		Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
		' Use this line if above errors
		'Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP")
		objXML.Open "GET", strFile, False
		File_Get_Contents = objXML.ResponseText()
		Set objXML = Nothing
	' Local File
		Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
		Set objFile = objFSO.OpenTextFile(strFile, 1)
		File_Get_Contents = objFile.ReadAll()
		Set objFile = Nothing
		Set objFSO = Nothing
	End If
End Function

Function File_Put_Contents(strFile, strContents, blnAppend)
	If blnAppend Then
		intMode = 8
		intMode = 2
	End If
	Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
	Set objFile = objFSO.OpenTextFile(strFile, intMode, True)
	Set objFile = Nothing
	Set objFSO = Nothing
End Function

Of course this file_get_contents doesn't support remote URLs, but it can easily be added.

EDIT: I just added remote URL support.


Useful SEO tools, etc.

Estibot LogoI consider myself somewhat of a domainer, so I’m always trying to keep a good overall look over the industry so I know what’s going to happen before others card” do. Rich When I find domains or sites I might be interested in, I typically do some quick research on them. I also wholesale jerseys like to keep a good handle on the statistics for my sites and how their keywords are operating.


The following is a list of random web tools I use nearly on a day-to-day basis in no particular order.

  • Estibot
    • This is a nice tool for evaluating the potential value of a domain. It uses several techniques including keyword value and frequency, domain length, TLD (top-level-domain) value, domain registration length, Google PageRank, etc. to produce a se handy (generally somewhat realistic) domain valuation. Keep in mind that a domain or site is always worth what someone is willing to pay for it, so make sure you wholesale MLB jerseys do far more research than just this.
  • DNScoop
    • This tool is very similar to estibot, except that it uses a slightly different algorithm to determine the valuation and has a slightly wholesale jerseys nicer interface, though Estibot is faster.
  • Nameboy
    • Again, this tool is similar to the other two. I would use it more, but it delivers the results via email which sometimes can take a while and be a pain. Oh well, it’s still free!
  • Dope Domains
    • This site has a very simple idea to it. It automatically spiders sites like TDNAM (GoDaddy’s domain after-market) and Sedo for the latest and greatest expiring domains. The filters are nice so that you are able to spot out domains you’re interested in by TLD and/or categories like domains with traffic, short domains, dictionary domains, etc.
  • DigitalPoint Forums
    • This site is a very large, active community with a small proportion of helpful people. They will give you their insight on the good, the bad, and the ugly of your domains and sites (sometimes whether you want it or not). It’s also a good place to buy and sell domains, sites, and services.
  • NamePros Forums
    • This site is very similar to No. DP (DigitalPoint). I have lost interest in it because it seems to be less active and people seem less helpful.

Freelance “time card” calculator

[ad]I don’t know how many others will find this handy, but I’ve found it handy myself. It’s tools like this that make this site “Random Web Tools.” 🙂

The script is very simple. I just basically created a format for logging the time you work in a text file, so that you can copy and paste in your “time card” and it will spit out your total time worked. The script could easily be modified to your liking. I threw up an example here. I originally wrote the script and also ported it to PHP.

Enter the times in the following format, separated by new lines or whatever. Whitespace does not matter. The number in the parenthesis is what counts. That’s the total hours:minutes worked during that period of work. The script could be improved by just counting up from the times themselves, but there are lots of problems that could run into unless you included dates, and for personal reasons, I chose not to do that. Don’t forget to change the hourly_rate variable if you want it to tell you how much you get owed.

1:27 PM - 2:08 PM		(0:41)
12:09 AM - 1:12  ENCIERROS  AM		(1:03)


HTML form:

Enter the times, separated by new lines or whatever. Whitespace does not matter.

PHP source code:

 0) {
		$pos2 = strpos($str, ')');
		$arr[$x] = substr($str, $pos + 1, $pos2 - $pos - 1);
		$str = substr($str, $pos2 + 2, strlen($str));
		$pos = strpos($str, '(');
	$hours = 0;
	$minutes = 0;

	for ($x = 0; $x = 60) {
			$hours = $hours + 1;
			$minutes  ПЕРЕДЕРЖКА  -= 60;
		$hours +=  Windows  $arr2[0];

	$total = $hours * 15 + $minutes / 60 * 15;

	echo "

Worked $hours hours and $minutes minutes (" . number_format($hours + $minutes / 60, 2, '.', '') . ")
That's $" . cheap nba jerseys number_format(($hours + $minutes / 60) * $hourly_rate, 2, '.', '') . "

"; } ?>

ASP source code:

		ReDim Preserve arr(x)
		pos2 = InStr(str, ")")
		arr(x) = Mid(str,  cheap jerseys  pos + 1, pos2 - pos - 1)
		str = Mid(str, pos2 + 2, Len(str))
		pos = InStr(str, "(")
		x = x + 1
	hours = 0
	minutes = 0

	For x = 0 To UBound(arr)
		arr2 = Split(arr(x), ":")

		minutes = minutes + CInt(arr2(1))

		If minutes >= 60 Then
			hours = hours + 1
			minutes = minutes - 60
		End If

		hours = hours + CInt(arr2(0))

	total = hours * 15 + minutes / 60 * 15


Worked " & hours & " hours and " & minutes & " minutes (" & FormatNumber(hours + cheap jerseys minutes / 60, 2) & ")
That's " & FormatCurrency((hours + minutes / 60), 2) & "

") End If %>