Category Archives: Development

Simple Twitter RSS Processing

I required a simple feed from Twitter into www.MindOver-matter.co.uk/news.php. There are numerous examples around but a lot of them are very convoluted. Below is an simple code example. The function could of course be modifed to be generic whereby user info etc would be passed in.

<?php

function parse_cache_feed($usernames, $limit) { 
  $feed = "http://twitter.com/statuses/user_timeline/130211322.rss";
  $xml = new SimpleXMLElement(file_get_contents($feed));
  if (count($xml->channel->item) == 0)  {
?>
          <p class="tweet">
              Sorry but failed to connect to Twitter for latest updates, 
              it is probably busy so try again later. 
              Or look <a href="http://www.twitter.com/MindOverMatter8">here</a> 
          </p>
<?php
  } else {
      foreach ($xml->channel->item as $item) {
          ?>
          <div class="calendar">
             <div class="calendar-month">
                  <?php echo date("M",strtotime($item->pubDate)) ?>
             </div>
             <div class="calendar-day">
                  <?php echo date("d",strtotime($item->pubDate)) ?>
             </div>
          </div>
          <p>
            <?php echo str_replace("MindOverMatter8:","",$item->description); ?>
          </p>
<?php 
      }
  }
} 

?>

Using site speed in web search ranking

Google as added yet another criteria to its algorithms to achieve good search ranking; speed of site. This can only be a good step in the right direction forcing designers and developers to ensure that their sites are optimized as much as possible.

The article has a number of references to some good free tools to evaluate the speed of the site.

See  Official Google Webmaster Central Blog: Using site speed in web search ranking.

Mind Over Matter Hypnotherapy in West Yorkshire – unlock your potential

Would you like to live your life with better health, greater happiness and increased confidence and success?  Well you can make those positive changes with hypnosis!  You can live your life the way you’ve always wanted, releasing bad habits, fears, and removing the limitations that are holding you back?

via Stop smoking or lose weight with hypnosis by Mind Over Matter Hypnotherapy in Wakefield, West Yorkshire – unlock your potential.

Another great site by markOnline for all your website design and website development.

IP Location API, database and fraud detection tools

IPInfoDB  provides a number of services that could be useful when developing a website including:

  • Web based IP geolocation lookup
  • IP geolocation API (XML, JSON and CSV format)
  • API that generate IP CIDR by country for iptables or htaccess blocklist
  • E-commerce fraud detection API

For example http://www.ipinfodb.com/ip_query.php?ip=82.27.34.78&output=xml&timezone=false will return the following XML.

<response>
<ip>82.27.34.78</ip>
<status>OK</status>
<countrycode>GB</countrycode
<countryname>United Kingdom</countryname>
<regioncode>Q5</regioncode>
<regionname>York</regionname>
<city>Dewsbury</city>
<zippostalcode />
<latitude>53.7</latitude>
<longitude>-1.6167</longitude>
</response>

This could be useful in identifying who your local customers are and respond with an appropriate message. Likewise if they reside a distance away could tailor the message to suit, for example you offer postage to that location

See www.ipinfodb.com for more information.

Proper testing on older browsers!

There are a number of sites that provide a snapshot picture of a particular page of a website running on various version of browsers. But if you want to test your website thoroughly  SPOON.NET offers a solution.

It allows you to run various browsers and versions  from the Spoon web site and other Spoon Servers. To enable this requires an extension installing on your browser. It currently provides:

  • IE  ver 6,7 and 8
  • Firefox ver 2, 3 and 3.5
  • Safari ver 3 and 4
  • Google Chrome
  • Opera ver 9 and 10

Additionally it has other tools, games, utilities, applications etc

Try it, it works!

Browser Sandbox – Run any browser from the web.

Hosted Testing of Web Sites

There are other providers of this service but I like Adobe® BrowserLab.

It is an online hosted service that lets you test the pages of your web site across a variety of web browsers and operating systems. The service works by taking screen shots of your web pages in different browsers, and then displaying them in the BrowserLab application window.

You can use BrowserLab as a standalone service, or integrated with Dreamweaver CS4. The standalone service lets you test pages that you’ve posted to a server within the context of a web browser. If you use BrowserLab as an integrated service with Dreamweaver, you can test your pages from within Dreamweaver without publishing your pages to a server.

BrowserLab supports the following browsers:

  • Firefox 2.0 – Windows XP
  • Firefox 3.0 – Windows XP
  • Firefox 3.5 – Windows XP
  • Chrome 3.0 – Windows XP
  • Internet Explorer 6.0 – Windows XP
  • Internet Explorer 7.0 – Windows XP
  • Internet Explorer 8.0 – Windows XP
  • Safari 3.0 – Macintosh OS X
  • Safari 4.0 – Macintosh OS X
  • Firefox 2.0 – Macintosh OS X
  • Firefox 3.0 – Macintosh OS X
  • Firefox 3.5 – Macintosh OS X

Adobe® BrowserLab.