<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- generator="FeedCreator 1.7.2-ppt (info@mypapit.net)" -->
<rss version="2.0">
    <channel>
        <title>Holyguard.net</title>
        <description>Web Design &amp; Development</description>
        <link>http://www.holyguard.net/rss</link>
        <lastBuildDate>Tue, 27 Jul 2010 22:03:53 +0100</lastBuildDate>
        <generator>FeedCreator 1.7.2-ppt (info@mypapit.net)</generator>
        <item>
            <title>FBJS Quick Jump Menu for a FBML Facebook Platform App</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/fbjs-quick-jump-menu-for-a-fbml-facebook-platform-app/2/52/378/</link>
            <description>holyguard.net - In a FBML Facebook App, your quick jump menu will require a little tweak to work in FBJS properly.
Just change your standard js jump menu from:

 
&amp;lt;select onchange=&amp;quot;goto(this.options[this.selectedIndex].value)&amp;quot;&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=1&amp;quot;&amp;gt;Page1&amp;lt;/option&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=2&amp;quot;&amp;gt;Page2&amp;lt;/option&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=3&amp;quot;&amp;gt;Page3&amp;lt;/option&amp;gt;
&amp;lt;/select&amp;gt;
 
To this:

 
&amp;lt;select onchange=&amp;quot;document.setLocation(this.getValue());&amp;quot;&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=1&amp;quot;&amp;gt;Page1&amp;lt;/option&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=2&amp;quot;&amp;gt;Page2&amp;lt;/option&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=3&amp;quot;&amp;gt;Page3&amp;lt;/option&amp;gt;
&amp;lt;/select&amp;gt;
 
Cheers.
</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>How to manage your online reputation, free tools forcommunity managers</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/how-to-manage-your-online-reputation-free-tools-forcommunity-managers/2/52/377/</link>
            <description>holyguard.net - Every single day, someone, somewhere is discussing something  important to your business; your brand, your executives, your  competitors, your industry. Are they hyping-up your company, building  buzz for your products? Or, are they criticizing your service,  complaining to others about your new product launch?
A great brand can take months, if not years, and millions of dollars  to build. It should be the thing you hold most precious.
It can be destroyed in hours by a blogger upset with your  company.
A new product launch could take hundreds of TV commercials, dozens of  newspaper ads, and an expensive ad agency.
It can also spread like a virus with the praise of just one  customer, at one message board.
A company can dominate market share, throttle competition and hold  the #1 brand in the world.
It can also crash in months if it fails to listen to what its  customers want.

By now, you should have an understanding of just how powerful  consumer generated media (CGM) is. Your next action could be the  difference between your company&amp;rsquo;s success or failure. Do you click the  &amp;ldquo;back&amp;rdquo; button and ignore the conversation, or; do you read the&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>PHP - The Singleton Pattern</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-the-singleton-pattern/2/52/350/</link>
            <description>holyguard.net - The Singleton Pattern is one of the GoF (Gang of Four) Patterns. This  particular pattern provides a method for limiting the number of  instances of an object to just one. It's an easy pattern to grasp once  you get past the strange syntax used. 

Consider the following class:


PHP Code:
classÂ Database { 
    
publicÂ functionÂ __construct()Â {Â ...Â }     
publicÂ functionÂ connect()Â {Â ...Â }    
publicÂ functionÂ query()Â {Â ...Â }  
Â Â Â Â 
...     
} 

This class creates a connection to our database.  Any time we need a connection we create an instance of the class, such as:


  PHP Code:
  $pDatabaseÂ =Â newÂ Database(); 
$aResultÂ =Â $pDatabase-&amp;gt;query('...');Â  


Lets say we use the above method many times during a script's  lifetime, each time we create an instance we're creating a new Database  object (we're also creating a new database connection, but that's  irrelevant in this example) and thus using more memory. Sometimes you  may intentionally want to have multiple instances of a class but in  this case we don't. 

The Singleton method is a solution to this common problem. To make the  Database class a Singleton we first need to add a new property to the  class,&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>PHP - calculating distance between two points </title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-calculating-distance-between-two-points-/2/52/346/</link>
            <description>holyguard.net - Because of the near-spherical shape of the Earth, calculating an accurate distance between two points requires the use of spherical geometry [1], and trigonometric math functions. For many applications, an approximate distance calculation provides sufficient accuracy with much less complexity.

To calculate an approximate distance in miles, we could do:
v  sqrt(x * x + y * y)  

where:

x = 69.1 * (lat2 - lat1) and y = 53.0 * (lon2 - lon1)

We can improve the accuracy, by adding the cosine math function:

sqrt(x * x + y * y)

where:

x = 69.1 * (lat2 - lat1) and y = 69.1 * (lon2 - lon1) * cos(lat1/57.3)

If you need greater accuracy, you can use the Great Circle Distance Formula [2]. This formula requires use of spherical geometry, and a high level of floating point mathematical accuracy - about 15 digits of accuracy (double-precision).

To convert latitude or longitude from decimal degrees to radians, we can divide the latitude and longitude values by 180/pi, or approximately 57.29577951. The radius of the earth is assumed to be 6,378.8 kilometers, or 3,963.0 miles.

Since we are using PHP, it&amp;rsquo;s much simpler, because the deg2rad() function does this calculation for us.

If you convert all latitude and longitude values&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>PHP - Download file with speed limit</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-download-file-with-speed-limit/2/52/344/</link>
            <description>holyguard.net - With this script we can limit the download speed
&amp;nbsp;

// local file that should be send to the client
$local_file = 'test-file.zip';
// filename that the user gets as default
$download_file = 'your-download-name.zip';

// set the download rate limit (=&amp;gt; 20,5 kb/s)
$download_rate = 20.5; 
if(file_exists($local_file) &amp;amp;&amp;amp; is_file($local_file)) {
    // send headers
    header('Cache-control: private');
    header('Content-Type: application/octet-stream'); 
    header('Content-Length: '.filesize($local_file));
    header('Content-Disposition: filename='.$download_file);
 
    // flush content
    flush();    
    // open file stream
    $file = fopen($local_file, &amp;quot;r&amp;quot;);    
    while(!feof($file)) {
 
        // send the current file part to the browser
        print fread($file, round($download_rate * 1024));    
 
        // flush the content to the browser
        flush();
 
        // sleep one second
        sleep(1);    
    }    

    //&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>PHP - Save remote images on our server using CURL</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-save-remote-images-on-our-server-using-curl/2/52/343/</link>
            <description>holyguard.net - Some hosts disabled the ini setting allow_url_fopen. This also means  that the ability to easily grab images by calling  imagecreatefromjpeg($img) where $img is a url for an external image  does not work.
This is a shame as this technique is pretty easy..


$remote_img = 'http://www.somwhere.com/images/image.jpg';
$img = imagecreatefromjpeg($remote_img);
$path = 'images/';
imagejpeg($img, $path);

However I was goin crazy  trying to get a product feed  integration system to work on a host that has disabled the  allow_url_fopen mechanism which meant the above wouldnt work.
Thankfully cURL was still working. So here is the function I made for grabbing and saving an image using cURL instead:

//Alternative Image Saving Using cURL seeing as allow_url_fopen is disabled - bummer
function save_image($img,$fullpath){
$ch = curl_init ($img);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
$rawdata=curl_exec($ch);
curl_close ($ch);
if(file_exists($fullpath)){
	unlink($fullpath);
}
$fp = fopen($fullpath,'x');
fwrite($fp, $rawdata);
fclose($fp);
}
</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>PHP - verify file existence in a local server</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-verify-file-existence-in-a-local-server/2/52/311/</link>
            <description>holyguard.net - The act to verify if a file exists, is one of more important tasks related to files operations, and luckily the file_exists() function makes this operation really easy for us. 
 
 
How it runs; we specify the filename to verify the only one parameter, and give result  true if file exists.  
 
Example:
 
 
 
    if (file_exists(&quot;image.png&quot;)) {
        print &quot;image.png exists!\n&quot;;
    } else {
        print &quot;image.png does not exist!\n&quot;;
    }
</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>XSLT - pass a parameter inside XSL with PHP</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/xslt-pass-a-parameter-inside-xsl-with-php/2/52/314/</link>
            <description>holyguard.net - Working in XSLT and PHP integration, one of the most necessary needs a developer necesitates, after XML-XSL integration, is how to pass variable or data inside the XSL script. 
  Why we necesite it? Well, for example if we do a dynamic Query (in this case XQuery) that use a Record (in this case one elemento of the XML tree), i mean the classic request (GET, POST o something else) but applied to the XSLT.
   
   
  XML tree example: location.xml

 
&amp;lt;CityLocations&amp;gt;
  &amp;lt;CityLocation&amp;gt;
    &amp;lt;CityID&amp;gt;1&amp;lt;/CityID&amp;gt;
    &amp;lt;LocationName&amp;gt;New York&amp;lt;/LocationName&amp;gt;
  &amp;lt;/CityLocation&amp;gt;
    &amp;lt;CityLocation&amp;gt;
    &amp;lt;CityID&amp;gt;2&amp;lt;/CityID&amp;gt;
    &amp;lt;LocationName&amp;gt;Chicago&amp;lt;/LocationName&amp;gt;
  &amp;lt;/CityLocation&amp;gt;
&amp;lt;/CityLocations&amp;gt;
 
Now we create the XSL file that execute the XQuery and receive the CityID parameter 
 Example:location.xsl.php
  
 
&amp;lt;xsl:stylesheet version=&amp;quot;1.0&amp;quot; xmlns:xsl=&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot;&amp;gt;
&amp;lt;xsl:template match=&amp;quot;/&amp;quot;&amp;gt;
    &amp;lt;table width=&amp;quot;100%&amp;quot;&amp;gt;
      &amp;lt;tr&amp;gt;
		&amp;lt;th&amp;gt;CityId&amp;lt;/th&amp;gt;
        &amp;lt;th&amp;gt;LocationName&amp;lt;/th&amp;gt;
      &amp;lt;/tr&amp;gt;
      &amp;lt;xsl:for-each select=&amp;quot;CityLocations/CityLocation[CityID=$CityID]&amp;quot;&amp;gt;
      &amp;lt;tr&amp;gt;
        &amp;lt;td&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;CityID&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;
        &amp;lt;td&amp;gt;&amp;lt;xsl:value-of select=&amp;quot;LocationName&amp;quot;/&amp;gt;&amp;lt;/td&amp;gt;
      &amp;lt;/tr&amp;gt;
&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>20 great PHP libraries that you need to know</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/20-great-php-libraries-that-you-need-to-know/2/52/319/</link>
            <description>holyguard.net - 
You&amp;rsquo;re in the middle of a project, and need to get everything done as soon as possible. To keep the deadline and still have a life, you would better to collect this awesome library on your fingertip. By knowing this library capability, then you&amp;rsquo;ll know when to use any of them.
Charting Library
You can create simple graph or chart using GD library on PHP, but to help you create more complex chart, then you&amp;rsquo;ll need this awesome library.

    pChart&amp;nbsp;- a PHP class to build charts.
    Libchart&amp;nbsp;- Simple PHP chart drawing library.
    JpGraph&amp;nbsp;- Object-oriented graph creating library for PHP.
    Open Flash Chart&amp;nbsp;- Flash based charting library.

&amp;nbsp;
RSS Parser Library
Parsing a RSS is not a fun thing to do, so you would better put this library and get everything done.

    MagpieRSS&amp;nbsp;- RSS for PHP.
    SimplePie&amp;nbsp;- Super-fast, easy-to-use, RSS and Atom feed parsing in PHP.

Thumbnail Generator
Just another way to create thumbnail.

    phpThumb&amp;nbsp;- The PHP thumbnail creator.

Payment
Dealing with an e-commerce site? Need payment solution? Don&amp;rsquo;t worry. Let this library help you.

    PHP Payment Library&amp;nbsp;- PHP Payment Library for Paypal, Authorize.net and 2Checkout&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>PHP and MVC - An example of Model View Controller with PHP</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-and-mvc-an-example-of-model-view-controller-with-php/2/52/303/</link>
            <description>holyguard.net - Model view controller architecture has been a staple of desktop application development for a hell of a long time, with the increasing complexity of these newfangled web applications and websites in general the encapsulation and flexibility of mvc design makes darn good sense (buzzwords bolded for the executives out there). But what happens when a good design idea meets a really really evil language...



Well ok, php isn't evil per se, it's just misunderstood. Grossly, horrifyling misunderstood on a level that only economists and libertarians can appreciate (and maybe perl programmers but they enjoy that kind of thing). It's simple, php allows people to write really bad code and still accomplish whatever it is they want to do and fast. However, it is possible to write readable, maintainable code in php and using mvc will help with that. So without further ado here's my interpretation of mvc in php.



The model is the interface to the database. All database specific code goes in here. If you are using flat files, tables, and/or smoke signals do all the loading and saving in the models. Here's the model for the example.



File model: animal.mdl



class Animal
{
public static function getAnimal($animal_id)
{
  $query = &quot;SELECT * FROM animals&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>JSON-JS - Cross Site Scripting with JSON and Javascript</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/json-js-cross-site-scripting-with-json-and-javascript/2/52/285/</link>
            <description>holyguard.net - After a while of search i found this easy way to import in my site JSON datas from external domains.
  
All is made in javascript and it don't needs particular AJAX frameworks, really easy, don't you think?

Example:




&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt; 
  
  function results(obj) { 
var rssoutput=&amp;quot;&amp;lt;h1&amp;gt;Find meteo for locality (coords)&amp;lt;/h1&amp;gt;&amp;quot; 
 rssoutput+= 'Clouds:'+obj.weatherObservation.clouds+'&amp;lt;br&amp;gt;';
  rssoutput+= 'weatherCondition:'+obj.weatherObservation.weatherCondition+'&amp;lt;br&amp;gt;';
  rssoutput+= 'observation:'+obj.weatherObservation.observation+'&amp;lt;br&amp;gt;';
  rssoutput+= 'windDirection:'+obj.weatherObservation.windDirection+'&amp;lt;br&amp;gt;';
  rssoutput+= 'elevation:'+obj.weatherObservation.elevation+'&amp;lt;br&amp;gt;';
  rssoutput+= 'countryCode:'+obj.weatherObservation.countryCode+'&amp;lt;br&amp;gt;';
  rssoutput+= 'lng:'+obj.weatherObservation.lng+'&amp;lt;br&amp;gt;';
  rssoutput+= 'temperature:'+obj.weatherObservation.temperature+'&amp;lt;br&amp;gt;';
  rssoutput+= 'dewPoint:'+obj.weatherObservation.dewPoint+'&amp;lt;br&amp;gt;';
  rssoutput+= 'windSpeed:'+obj.weatherObservation.windSpeed+'&amp;lt;br&amp;gt;';
  rssoutput+= 'humidity:'+obj.weatherObservation.humidity+'&amp;lt;br&amp;gt;';
  rssoutput+= 'stationName:'+obj.weatherObservation.stationName+'&amp;lt;br&amp;gt;';
  rssoutput+= 'datetime:'+obj.weatherObservation.datetime+'&amp;lt;br&amp;gt;';
  rssoutput+= 'lat:'+obj.weatherObservation.lat+'&amp;lt;br&amp;gt;';
  rssoutput+= 'hectoPascAltimeter:'+obj.weatherObservation.hectoPascAltimeter+'&amp;lt;br&amp;gt;';
  rssoutput+= '&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;';
  
  //document.write(rssoutput);
  var txt = document.getElementById(&amp;quot;meteo&amp;quot;);
  txt.innerHTML=rssoutput; 
 } 
  
  function dynamicScript(url){ 
  var script=document.createElement('script'); 
  script.src=url;script.type=&amp;quot;text/javascript&amp;quot;; 
  document.getElementsByTagName('head')[0].appendChild(script); 
  
  } 
  dynamicScript('http://ws.geonames.org/findNearByWeatherJSON?lat=39.542500&amp;amp;lng=2.594500&amp;amp;callback=results');
  &amp;lt;/script&amp;gt; 
  
  &amp;lt;div id=&amp;quot;meteo&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;




In the practice, for consume external JSON, i simulate that this is an external javascript code. External javascripts aren't blocked by browsers.
Then i call the name function with callback and apply it in the script.

Have a nice practice.
&amp;nbsp; </description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>OpenID Libraries</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/openid-libraries/2/52/282/</link>
            <description>holyguard.net - The following libraries are available to assist with the implementation of an OpenID Identity Server and Consumer. The libraries in this section are intended to help with handling all of the details specific to OpenID and leaving you to provide the glue to integrate it into your site.
Note: these are libraries for consumer and/or server.  Look in the standalone server area for links to OpenID servers in several different languages..

    
        
            Library
            Language
            License
            Relying party
            Provider
            OpenId version
            Notes
        
        
            DotNetOpenId
   &amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>Write html in a div with javascript</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/write-html-in-a-div-with-javascript/2/52/257/</link>
            <description>holyguard.net - writing html content to div tag with javascript
   
the code:



function WriteLayer(ID,parentID,URL) {
  if (document.layers) {
  var oLayer;
  if(parentID){
  oLayer = eval('document.' + parentID + '.document.' + ID + '.document');
  }else{
  oLayer = document.layers[ID].document;
  }
  oLayer.open();
  oLayer.write(URL);
  oLayer.close();
  }
  else if (parseInt(navigator.appVersion)&amp;gt;=5&amp;amp;&amp;amp;navigator.
  appName==&amp;quot;Netscape&amp;quot;) {
  document.getElementById(ID).innerHTML = URL;
  }
  else if (document.all) document.all[ID].innerHTML = URL
}



Try to  using like this:




&amp;lt;a href=&amp;quot;javascript:WriteLayer('ctd',null,'testing')&amp;quot;&amp;gt;blablabla&amp;lt;/a&amp;gt;
&amp;lt;div class='ctd'&amp;gt;&amp;lt;/div&amp;gt;



</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>Google Analytics - Site Overlay</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/google-analytics-site-overlay/2/52/254/</link>
            <description>holyguard.net - Google has updated their Google Analytics service, adding back in their Site Overlay feature. Unlike the overlay features from other vendors, it operates within a frame of the reporting UI. Four measures are included that I can see: Clicks, Clicks %, G1/Clicks, and Avg. Score. I don't have any goals setup, so I don't have a ton of data to review at this time.

Here's a screenshot of the site overlay frame using data for this blog:

From what I've seen so far, they've made the tool relatively simple and limited in scope. Per their help, it's currently limited to &amp;quot;static pages with unique links to content located elsewhere on the website&amp;quot;. They also note that the overlay is &amp;quot;not currently able to work with the following types of content:

    Javascript links
    CSS content
    Flash navigation
    downloadable files (.pdf)
    outbound links
    frames
    auto redirects.&amp;quot;

As I'm checking out the service, I'm intrigued by something. As you navigate inside the overlay window, your browser isn't actually requesting content from your site directly, but rather, the data is coming through Google's systems - I'm&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>Google Analytics - Map Overlay</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/google-analytics-map-overlay/2/52/253/</link>
            <description>holyguard.net - This is the first in a series of posts covering some of the useful things you can find out with Google Analytics, starting with the Visitors Map Overlay. Building up information about your customers is incredibly useful for businesses as they are better informed to respond to the market they operate in. This post discusses some of the benefits that knowing the geographical location of your website visitors can bring.
&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
Google Analytics
Analytics is a fantastic tool available for free from Google. It incredibly easy to install as long as you have a Gmail account and ftp access to your site you wish to track so you can add the a script to each page. Although the main focus of Analytics is to try to facilitate the successful use of Adwords (through conversion rates and the setting up of goals), the statistics collected provide an invaluable insight into the visitors of your website.
Visitors Map Overlay - 'Geotargeting'
Analytics allows you do pinpoint geographically where your visitors access your website from through what it calls 'Geotargeting'. The Visitors Map Overlay can be accessed by clicking on the 'Visitors' section, then the top 'Visitors Map Overlay' link just underneath it. The default view Analytics gives&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>PHP Arrays - Introduction</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-arrays-introduction/2/52/251/</link>
            <description>holyguard.net - 
An array is a data structure that stores one or more values in a single value. For experienced programmers it is important to note that PHP's arrays are actually maps (each key is mapped to a value).
PHP - A Numerically Indexed Array
If this is your first time seeing an array, then you may not quite understand the concept of an array. Imagine that you own a business and you want to store the names of all your employees in a PHP variable. How would you go about this?
It wouldn't make much sense to have to store each name in its own variable. Instead, it would be nice to store all the employee names inside of a single variable. This can be done, and we show you how below.
  PHP Code:



$employee_array[0] = &amp;quot;Bob&amp;quot;;
  $employee_array[1] = &amp;quot;Sally&amp;quot;;
  $employee_array[2] = &amp;quot;Charlie&amp;quot;;
  $employee_array[3] = &amp;quot;Clare&amp;quot;;



In the above example we made use of the key / value structure of an array. The keys were the numbers we specified in the array and the values were the names of the employees. Each key of an array represents a value that we can manipulate and reference. The general form for setting the key&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>Php Getlink:a function that creates  links in Php</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-getlinka-function-that-creates--links-in-php/2/52/247/</link>
            <description>holyguard.net - getLink() is a function that will make creating URLs much easier. This function expects two arguments - the first argument is the URL and the second one is an array with all the parameters that should be passed with the URL. The function will combine the existing URL with the parameter array and return the resulting URL.



One important thing to note is that the final URL will use '&amp;amp;' to separate the parameters instead of just '&amp;'. This is to ensure valid HTML in the output. If you don't like that, just str_replace() it out.



If there is extra parameters in the first URL, that will be present in the final URL.

Arguments



First Argument ($url)

    The base URL. The parameters will be added to this.


Second Argument ($params)

    An associative array containing all the parameters and their values.


Third Argument ($use_existing_arguments)

    This is an optional argument. If this is set to 'true', the function will use the parameters that are present in the current page along with the $params array when creating the URL.



Example Code

Two Arguments



getLink(&quot;http://www.google.com/search&quot;,array(
		&quot;q&quot;=&gt;&quot;binny&quot;,
		&quot;hello&quot;=&gt;&quot;world&quot;,
		&quot;results&quot;=&gt;10)
	);


will return

http://www.google.com/search?q=binny&amp;amp;hello=world&amp;amp;results=10

Three Arguments



Assume that the current page is http://www.example.com/index.php?sort_order=name&amp;page=3



getLink(&quot;http://www.example.com/edit.php&quot;,array(
		&quot;item_id&quot;	=&gt; 15,
		&quot;return_url&quot;=&gt; 'index.php'
	),
true);


This call will return
http://www.example.com/edit.php?sort_order=name&amp;amp;page=3&amp;amp;item_id=15&amp;amp;return_url=index.php
Code


/**
 * Create a link by joining&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
        <item>
            <title>Apache:how to prevent hotlinking</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/apachehow-to-prevent-hotlinking/2/52/226/</link>
            <description>holyguard.net - Apache Rewrite Module

The mod_rewrite Apache module is one of the best tools you can have on your server to help prevent unauthorized sites &amp;quot;hotlinking&amp;quot; your images or other files. Providing that your server has been set up for it, you can use this module for a number of things.

&amp;nbsp;&amp;nbsp;&amp;nbsp; * To prevent unauthorised use of files and images
&amp;nbsp;&amp;nbsp;&amp;nbsp; * To hide the real location of files on the server
&amp;nbsp;&amp;nbsp;&amp;nbsp; * To translate script input from one format to another
&amp;nbsp;&amp;nbsp;&amp;nbsp; * To redirect the user based on...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; o time of day
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; o file they accessed
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; o network they are connecting from
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; o or anything else that can identify them as part of a &amp;quot;group&amp;quot; of users

Preventing Hotlinking

The most common use of the RewriteEngine is to limit access to specific file types on the server. To do this, you will need to add some rules and conditions to your .htaccess file so that the server knows what to look for and what to do when it finds requests that don't meet the criteria.

When editing your .htaccess file it is recommended that you use Notepad or equivalant to keep the file clean. Remember to upload the file in ASCII mode!

Here is a generic&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:53 +0100</pubDate>
        </item>
    </channel>
</rss>
