<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bohack &#187; Scripts</title>
	<atom:link href="http://www.bohack.com/tag/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bohack.com</link>
	<description>Check In and Tune Out!</description>
	<lastBuildDate>Wed, 24 Feb 2010 18:55:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Simple VBScript to Display a Web Page</title>
		<link>http://www.bohack.com/2009/02/simple-vbscript-to-display-a-web-page/</link>
		<comments>http://www.bohack.com/2009/02/simple-vbscript-to-display-a-web-page/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 17:27:47 +0000</pubDate>
		<dc:creator>Bohack</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://www.bohack.com/?p=279</guid>
		<description><![CDATA[I was currently working on a VBScript to pull some information from a web page. So decided to build a function for it, so that it can be reused over and over again in other scripts. It uses the XMLHTTP library to query a URL and return the elements, I just ask for the responsetext [...]]]></description>
			<content:encoded><![CDATA[<p>I was currently working on a VBScript to pull some information from a web page. So decided to build a function for it, so that it can be reused over and over again in other scripts. It uses the XMLHTTP library to query a URL and return the elements, I just ask for the responsetext and return it.</p>
<p><span id="more-279"></span></p>
<pre>Function GetHTML (url)
dim http
set http = createobject("msxml2.xmlhttp.3.0")
http.open "get", url, False
http.send

GetHTML = http.responsetext

set http = Nothing
End Function

WScript.echo GetHTML ("http://www.bohack.com")
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bohack.com/2009/02/simple-vbscript-to-display-a-web-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Page Stop Watch</title>
		<link>http://www.bohack.com/2009/01/php-page-stop-watch/</link>
		<comments>http://www.bohack.com/2009/01/php-page-stop-watch/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 01:20:50 +0000</pubDate>
		<dc:creator>Bohack</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.bohack.com/?p=261</guid>
		<description><![CDATA[Lots of time I have web pages performing complex functions and want to make sure that they execute without a problem. A problem would be they just take too damn long and time out when put under a load. This is the problem when things don&#8217;t scale properly, they just get really slow. So in [...]]]></description>
			<content:encoded><![CDATA[<p>Lots of time I have web pages performing complex functions and want to make sure that they execute without a problem. A problem would be they just take too damn long and time out when put under a load. This is the problem when things don&#8217;t scale properly, they just get really slow. So in order to gauge how long a page takes to load we really need a stop watch. Luckily we the components of one&#8230;</p>
<p><span id="more-261"></span><br />
The PHP microtime() function returns the UNIX timestamp with micro-seconds.</p>
<pre>&lt;?php echo (microtime()) ?&gt;;   //returns 0.123123 1231231231</pre>
<p>The first number is the microseconds from the change of the second number, which is the time in seconds from the UNIX epoch of 0:00:00 Jan 1st 1970.  So we can explode the line returned into an array using the explode command, then mathematically add them together. i.e. 1231231231.123123. The last line will take the end time and subtract the start time. The result will be displayed in the HTML comments towards the end of the page, where this code is executed.</p>
<pre>Put this at the beginning of your page inside of the php tags.

$start=microtime();
$start=explode(" ",$start);
$start=$start[1]+$start[0];

// do something here

Put this at the end of you page inside of the php tags.

$end=microtime();
$end=explode(" ",$end);
$end=$end[1]+$end[0];

printf("\n&lt;!-- Page was generated by PHP %s in %f seconds --&gt;\n",phpversion(),$end-$start);</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bohack.com/2009/01/php-page-stop-watch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
