<?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>Albertech.net &#187; script</title>
	<atom:link href="http://albertech.net/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://albertech.net</link>
	<description>Guides and Reviews for WordPress, PHP, MySQL, Apache, CMS Systems, jQuery, and other Technologies</description>
	<lastBuildDate>Fri, 11 May 2012 23:39:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>PHP Script to fix AJAX Access-Control-Origin Errors</title>
		<link>http://albertech.net/2011/02/php-script-fix-ajax-access-control-origin-error/</link>
		<comments>http://albertech.net/2011/02/php-script-fix-ajax-access-control-origin-error/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 01:26:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=618</guid>
		<description><![CDATA[If you have an AJAX application that uses a PHP back-end app on a different server as your web front-end server (e.g. load balancing, cdn's, etc), your PHP script will need to send header variables with the allowed content server name(s).<br /><br />

Web browsers are now following a standard for HTTP Access control to prevent client-side Cross Site scripting attacks.<br /><br />

I tested this with Firefox and it simply blocks the request without any error messages. Google Chrome browser will error out with the following message if the access control origin is not set correctly on your PHP script. (woot!)<br /><br />

"XMLHttpRequest cannot load [PHP URL].. Origin [JAVASCRIPT URL] is not allowed by Access-Control-Allow-Origin."
<br /><br />

For example, if the Javascript is hosted on example.com and your PHP app is on example.org.

Below is the PHP script for fixing this error. [see full message for the solution]]]></description>
		<wfw:commentRss>http://albertech.net/2011/02/php-script-fix-ajax-access-control-origin-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP: Display page render time</title>
		<link>http://albertech.net/2009/06/php-display-page-render-time/</link>
		<comments>http://albertech.net/2009/06/php-display-page-render-time/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 19:06:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[render time]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=191</guid>
		<description><![CDATA[Here's what I currently use to determine how long it takes to generate a page in PHP. Its only 8 lines of code. ]]></description>
		<wfw:commentRss>http://albertech.net/2009/06/php-display-page-render-time/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP Uptime check</title>
		<link>http://albertech.net/2008/11/php-uptime-check/</link>
		<comments>http://albertech.net/2008/11/php-uptime-check/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 21:49:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[uptime]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=38</guid>
		<description><![CDATA[I found a useful script in PHP that can be used for checking uptime of a server. It can be useful for checking when the servers have a such a significant load that pages can't be displayed. The benefit or running it locally is that I can configure the script to perform failover functionality if necessary. Online uptime services are good too, but most of them aren't free. Maybe I should force the server to show a <a href="http://www.urbandictionary.com/define.php?term=failwhale">failwhale</a> when the site gets too busy...  j/k :D

Here's the link to the script.
<a href="http://www.programmingtalk.com/showthread.php?t=34999">http://www.programmingtalk.com/showthread.php?t=34999</a>

<code>
<?php 

// the URL you want to ... ]]></description>
		<wfw:commentRss>http://albertech.net/2008/11/php-uptime-check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

