Archives for: 2010
29/11/10
Ebay Store Integration
If you are selling on ebay and you also have your own online store. You can save a lot of time by syncing the products together.
EBAY API (
http://developer.ebay.com/products/trading/ ) provides a programming interface so that web developer can sync your 2-store.
Save valuable time and resource by using the Advansys eBay integration module where your ecommerce solution automatically updates eBay via the eBay API (application programming interface) with your chosen products without any manual intervention. Have the ability to instantly list all of your products from your ecommerce website on eBay as a ‘Buy it Now’ product. The eBay integration module allows you to add and remove multiple products giving you full control whilst saving you time and money. It’s the perfect way to easily find valuable new customers.
The beauty of this integral solution is that all processes that you would normally complete on eBay are seamlessly controlled and executed via one single interface. This single interface controls many aspects of eBay, for example, stock and order processing, shipping, order fulfilment and payments.
The integration work will automate the following elements of eBay, second chance offers, submit products to be listed, best offers, counter offers, reclamation of fees for any products unsold, retrieve current listings of ebay categories, retrieve high bid information, leave feedback about other users and display ebay listings on other websites.
We also offer eBay store designs where our designers will customise your eBay page so that it matches the branding on your ecommerce website and keeping your whole company look professional.
why trade on eBay?
Launched in the UK in October 1999 eBay.co.uk has over 15 million customers and more than 10 million products are sold at any one time via the internet: an ideal virtual shop front for any business who wishes to trade online. From a worldwide perspective eBay.com has over 212 million customers who buy and sell in more than 50,000 categories: a target market you don’t want to miss out on.
Integrating your ecommerce solution into eBay via their API is a valuable sales tool and gives you another valuable route to market to promote and sell your products online via the internet.
why do you need both an ecommerce site and an eBay store?
There are many reasons why someone would want an ecommerce website that is integrated with an eBay store. If an ebay store becomes really popular with many visitors and transactions, they may want to expand the business and appeal to other markets. The advantage and disadvantage of having just an ebay store site is that you are only really targeting ebay users with ebay or PayPal accounts. An ebay store also doesn’t allow the freedom of adding functionality in the future in the same way that an ecommerce solution can do.
By integrating both the stores into one solution, it gives you and your customer’s one place to find all of your products and services. A professional ecommerce solution can show users that you are a legitimate business and have invested in a website with a distinct brand identity. It also brings the features, functionality and target audience of both ebay and a professional ecommerce website.

11/11/10
14/10/10
Open link in a new window or tab
Using old basic javascript it is very simple to open a link or new page on a new window.
Code: | window.open('http://www.pageresource.com/jscript/jex5.htm','mywindow','width=400,height=200') |
Below is a list of the attributes you can use:
1. width=300
Use this to define the width of the new window.
2. height=200
Use this to define the height of the new window.
3. resizable=yes or no
Use this to control whether or not you want the user to be able to resize the window.
4. scrollbars=yes or no
This lets you decide whether or not to have scrollbars on the window.
5. toolbar=yes or no
Whether or not the new window should have the browser navigation bar at the top (The back, foward, stop buttons..etc.).
6. location=yes or no
Whether or not you wish to show the location box with the current url (The place to type http://address).
7. directories=yes or no
Whether or not the window should show the extra buttons. (what’s cool, personal buttons, etc…).
8. status=yes or no
Whether or not to show the window status bar at the bottom of the window.
9. menubar=yes or no
Whether or not to show the menus at the top of the window (File, Edit, etc…).
10. copyhistory=yes or no
Whether or not to copy the old browser window’s history list to the new window.
You can use Jquery to force all links in the page will open the target page in a new window:
Code: | <script type="text/javacript"> |
| var $j = jQuery.noConflict(); |
| $j(document).ready(function() { |
| //external attribute |
| $j("a:not([@href*=http://YOURSITE.com/])").not("[href^=#]") |
| .addClass("external") |
| .attr({ target: "_blank" }); |
| } ); |
| </script> |

12/10/10
bmi.js
Today I have problem with the ADSL in office and I have to connect the HTC Hero provided by T-mobile to browse the Internet and SSH onto our servers for urgent maintenance.
I notice one of our clients’ website got some Javascript injected, right in the html header:
src="http://1.2.3.8/bmi-int-js/bmi.js"
My heart sinks and I thought that account is hacked. It turns out that T-Mobile (and Vodafone UK) thinks it is appropriate to insert their own Javascript into each page which I visit, which pipes all images through a proxy to degrade their quality. This will save bandwidth but the images look horrible on a 27″ PC screen. On a HTC hero tiny screen I am sure I will not notice a thing. But there you ago, a false alarm…
08/10/10
Cookery School Gift Vouchers
04/10/10
BT Fibre Internet in Shrewsbury Campaign - BT Infinity
22/09/10
Delegate Mailbox Access in Active Directory

15/09/10
27/08/10
Jquery cycle plugin with caption and image preload
JQuery Cycle is a wonderful plugin to add slideshow to your website easily. It supports slide effects (fading, cross, sliding etc..) and call back functions.
http://jquery.malsup.com/cycle/
We would like to put the slideshow on one part of the page and the caption on another location. The end result should look likes the slideshow on the home page of http://www.sjhill.co.uk
Pages: 1 2
24/08/10
What process/program is accessing your hard drive madly?
If you are not using your computer or even not “intensively” using it, the hard disk drive LED still flash all time or just stay solid-on. Sometimes you can even hear that the hard drive is grinding. It can still happen even if you have closed all running programs. If you’re using laptop, it’s even worse because the fan will start spinning like mad.
This hidden process/program is slowing down your computer and sometime makes it un-usable.
To find out what hidden process/program is using your hard drive, you can google for some free tool and run it on your computer. You need to be careful what kind of tools you can run on your PC. Install a trust-worthy Antivirus software such as ESet before you install anything.
However, if you are using Windows, you can use the task manager. Start your task manager, click ‘View’ and then ‘Columns’, tick the ‘I/O Read’ and ‘I/O Write’ ticboxes. Click ‘OK’. And then on the task manager, click on ‘Processes’ tab, click on the ‘I/O reads’ heading so that you can see which process/program is using the most of such resources. You can right click on the process and kill it if it is not part of the core processes.
 Task Manager IO options

New Acupuncture Clinic Website Launched
23/08/10
.htaccess to exclude password protected sub folder
In Wordpress installation, the default .htaccess is
Code: | RewriteEngine On |
| RewriteBase / |
| RewriteCond %{REQUEST_FILENAME} !-f |
| RewriteCond %{REQUEST_FILENAME} !-d |
| RewriteRule . /index.php [L] |
Basically it says if there is a file name or folder name of such, the rewrite rule will ignore it.
However, if you have a sub folder, for example, called subfolder, with another .htaccess within it to password protected that folder, the rewritecond will simply just not work.
Some people say you can put
Code:
in the .htaccess file within the subfolder. However, the .htaccess file of subfolder will not processed until the one of root folder is processed. That means it will never work.
Some suggests using IP address to protect the folder rather than password. This can only work to an extent if customer got a static IP on their ADSL router.
We found another way definitely work by using sub-domain name. If you setup your server to point the sub-domain directly to that folder, that folder will become root under the sub domain and the .htaccess will not be processed.

17/08/10
theblazingsaddles.com - Charity Event
Henry Brydon and Jamie King begin an epic bike adventure from London to Sydney on 3rd May 2010, cycling 25,000km through 25 countries. In doing this, they hope to raise a significant sum of money for Brain Tumour Research (Henry) and the MS Society (Jamie).
http://www.theblazingsaddles.com
Spark Computing developed and maintained the website (a mini text/picture/video blog is included) to help this charity event. Please support them by donating to the charity via this link
http://www.justgiving.com/henrybrydon
Or
http://www.justgiving.com/jamie-king
Thank you!

Free Wordpress Premium themes
For many people who know what they do, they can have a self-made website by using Wordpress and the widely available themes on the Internet.
Many hosting companies provide Wordpress from web hosting control panel. If you are not sure please email info@sparkcomputing.co.uk for help. Once you have Wordpress installed in your hosting space, you can login to the admin and install themes. You can install the themes in 2 ways:
1. In the admin, click the “Appearance” menu item, click on the “Install Themes” tab, you can search a theme available at wordpress.org by keywords. In the search results, click ‘Install’ link to install the theme
2. In the admin, click the “Appearance” menu item, under the “Install Themes” tab, click “upload", then upload the theme file you downloaded from the Internet. The theme file is a zip file containing various files.
After the theme is installed, you need to activate the theme and you are ready to go.
So popular place to get free wordpress themes:
http://www.themes2wp.com
http://newwpthemes.com/
Happy blogging!

16/06/10

03/06/10
Free Web Design and Development Books
Here is a list of free e-books on web design and development. You can either browse them online or download them.
1. Web Style Guide

“A style guide for the interface with real long-run value, showing us deep principles of design rather than simply fashion and technology.”
http://www.webstyleguide.com/index.html
2.Software Engineering for Internet Applications
Free pdf book about web application development. Topics covered: Basics, Planning, Software Structure, User Registration and Management, Content Management, Software Modularity, Discussion, Adding Mobile Users To Your Community, Voice (VoiceXML), Scaling Gracefully, Search, Planning Redux, Distributed Computing with HTTP, XML, SOAP, and WSDL, Metadata, User Activity Analysis and Writeup.
http://philip.greenspun.com/seia/introduction
3. How to Design a Web Site: A Beginners Guide
http://www.web-source.net/web_design_course.htm
It’s very important to learn the principal of Web Design before one should dig into the syntax and technique of html and css. One always need to get the big picture right first.

02/06/10
Image Gallery for your website
PHP & Image Gallery
Image galleries with admin areas are growing demand for many small websites. With digital cameras everywhere, people need places to put their pictures for everyone to see. One of the most practical ways is an online image gallery written in PHP. PHP lets the admin upload images and assign captions to each image with some description. PHP retrieves images and neatly displays the images with their file size, date added and captions. The photo galleries can be used to showcase your products, case studies, and customer testimonials.
Users may also be able to rate the images, or give their comments regarding it.
Some examples of image galleries we have done are:
http://www.shropshireblinds.co.uk/portfolio.html
http://www.romolo.co.uk/gallery.html
http://www.stuarthayphotography.co.uk/
http://totalav.tv/index.php?topic=case&id=38
If you need help for a bespoken gallery for your website please feel free to contact us.

26/05/10
List files and extra file(s) from tar or tar.tgz
On a Linux Web Server:
To extra some files rather than everything
tar -xvzf website_archive.tgz home/username/thefolder
If the archive is huge it will still take time to extract the folder/file. But it is better than untar everything.
To list the content of a gz tar ball
tar -ztvf website_archive.tgz
To list content of the bzip tar ball
tar -jtvf website_archive.tar.bz2
15/05/10
Fast Full Text Search
We have a large database with tens of thousands records. Each record has various text fields that should be searchable. All the records are stored in MySQL.
Initially we use the LIKE “%keyword%", however, a command word such as ‘flower’ search takes 40s and the server load is extremely high. This is not acceptable on a public website.
Secondly, we re-write the codes to use MySQL’s full text search feature. The result is still disappointing as the same search still takes half a minutes.
We discover a new search utility provided by Zend called Zend Lucene Search. We heard about Lucene before as people in Yell.com are using this technology to power their search.
Here is a quick guide on how to get Zend Lucene running for your website:
1. Get & install Zend framework
The minimal version of Zend Framework will do the work well.
http://framework.zend.com/download/current/
Unzip the file and put it under /usr/local/lib/zend
Update your php.ini to add the zend framework in your include directories.
2. Build the index.
In our case, we use DataObject within the Pear library to get records from database and then use Zend Lucend to make index.
PHP: |
|
| require_once('Zend/Search/Lucene.php'); |
| |
|
|
| Zend_Search_Lucene_Analysis_Analyzer::setDefault( |
| new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive()); |
| |
| $index = Zend_Search_Lucene::create($zend_indexPath); |
| |
| |
| $photo = DB_DataObject::factory('Photo'); |
| $photo->find(); |
| |
| |
| while($photo->fetch() ) |
| { |
| $doc = new Zend_Search_Lucene_Document(); |
| |
| $doc->addField( |
| Zend_Search_Lucene_Field::UnIndexed('id', $photo->id)); |
| |
| |
| $doc->addField( |
| Zend_Search_Lucene_Field::Unstored('code', stripSlashes($photo->code))); |
| |
| $doc->addField( |
| Zend_Search_Lucene_Field::TEXT('name', stripSlashes($photo->name))); |
| |
| $doc->addField( |
| Zend_Search_Lucene_Field::Unstored('detail', stripSlashes($photo->detail))); |
| |
| $doc->addField( |
| Zend_Search_Lucene_Field::Unstored('keywords', stripSlashes($photo->keywords))); |
| |
| $doc->addField( |
| Zend_Search_Lucene_Field::UnIndexed('url', "domain/index.php?id=$photo->id")); |
| |
| |
| $index->addDocument($doc); |
| } |
| |
| $index->commit(); |
| |
|
|
| $index->optimize(); |
3. Update the index
You can run the above codes in the cron job daily to keep your index uptodate.
You can also make finer control by removing the records from the index and then add it back if the record is changed.
In our case, there is no such frequent change in database so we just re-make the index daily.
4. Make query
The Lucene query language is easy and simple.
PHP: | require_once('Zend/Search/Lucene.php'); |
| |
|
|
| Zend_Search_Lucene_Analysis_Analyzer::setDefault( |
| new Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive()); |
| |
| $index = Zend_Search_Lucene::create($zend_indexPath); |
| $results = $index->find("+flower"); |
| |
| echo $index->count()." records found.\n\n"; |
| |
| if($index->count()) |
| |
| { |
| |
| $count = 0; |
| |
| foreach ($results as $result) |
| |
| { |
| echo "<a href='$result->url'>$result->name </a><br/>"; |
| |
| } |
| } |
| } |
The beauty is: there is no need to use the processing power of MYSQL at all when user makes a query. In fact, the same search is cut from 30s to just 1s. The improvement is amazing.
In fact, we can use this technology to build our own search engine for a large website. Lucene can be used to index html, Excel, PDF, Word documents as well as to index database records.
There is also plugin for you to highlight search results.

12/05/10
Install ImageMagick on cPanel
On a cpanel web hosting server, to install ImageMagick you need to run if you got it running or not
# /scripts/checkimagemagick
If you installed Imagemagick via the rpm package
you can find if it is on your system or not by :
rpm -qa |grep image
If all the answers are no, you can simply install it by running
# /scripts/installimagemagick
To hook PHP to ImageMagick, you need to also install it via WHM
Log into WHM >> Software >> Module Installers >> PHP Pecl and install imagick to get the whole thing binding into PHP
04/05/10
Monitor if the remote host alive or not using PHP
The simplest way to find out if the remote host is alive or not is to use the ping utility. Pear provides such a convenient tool.
First, you need to install the right module
Code:
Here is the php
PHP: |
|
| require ("Net/Ping.php"); |
| |
|
|
| $ping = Net_Ping::factory(); |
| |
|
|
| if(!PEAR::isError($ping)) |
| { |
| $response = $ping->ping('REMOTE_HOST_IP_or_name'); |
| |
| if( $response->_transmitted > 0 && $response->_received ==0 && $response->_loss ==100) |
| { |
| mail("your email address", "remote host is not responding", date("Y-M-D H:i:s"), "From: your_email"); |
| }else{ |
| |
| } |
| |
| } |
The above code will send out email to you if the remote host is not responding. However, if the remote host is behind a firewall or if ping packets are blocked by firewall, the ping is not going to work.
05/03/10
Paypal Currency Codes
Code: | Code Currency Name Symbol |
| AUD Australian Dollars |
| CAD Canadian Dollars |
| CHF Swiss Franc |
| CZK Czech Koruna |
| DKK Danish Krone |
| EUR Euros € |
| GBP Pounds Sterling £ |
| HKD Hong Kong Dollar |
| HUF Hungarian Forint |
| ILS Israeli Shekel |
| JPY Japanese Yen ¥ |
| MXN Mexican Peso |
| NOK Norwegian Krone |
| NZD New Zealand Dollar |
| PLN Polish Zloty |
| SEK Swedish Krona |
| SGD Singapore Dollar |
| USD United States Dollars $ |
04/03/10
HTML Signature for Gmail
Gmail does not support rich text signature. That means you can’t have link, colors, images or any formatting with the Gmail signature.
There are ways to get around it.
1. copy and paste
Make your signature in Word and copy it to gmail’s composer each time you want to send an email.
2. Chrome/Firefox extension.
http://blankcanvasweb.com/pages/id_9/n_gmail_signatures/
The extension allows you to save your signature in your browser.
But if you use another PC, you will not be able to have the signature coming up automatically because it is saved to the PC where you installed the extension.
Regards,

Generate RSS feeds for your website
RSS newsfeeds and product feeds provide a variety of opportunities for increasing traffic to your website. Publishing your own feed is a great way to cut through the clutter of email spam and get your message directly to your target market. Interested parties can subscribe your RSS channel using common Email clients like Outlook. There are also many RSS readers available for Iphones or other smart phones.
RSS slowly becomes one of the important online marketing / SEO tasks.
Provided you already have an online product catalogue. Here is simple PHP code to use to generate a RSS feed:
PHP: | <?php |
| function xmlentities($str) |
| { |
| $xml = array('"','&','&','<','>',' ','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','­','®','¯','°','±','²','³','´','µ','¶','·','¸','¹','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ý','þ','ÿ'); |
| $html = array('"','&','&','<','>',' ','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','­','®','¯','°','±','²','³','´','µ','¶','·','¸','¹','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ý','þ','ÿ'); |
| |
| $str = str_replace($html,$xml,$str); |
| |
| return $str; |
| } |
| |
| $pro = DB_DataObject::factory('Product'); |
| $pro->find(); |
| $xml ='<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/"> |
| <channel> |
| <title>Water Coolers from Wenlock Water coolers Ltd</title> |
| <link>http://www.wenlockwatercoolers.co.uk/rss.php</link> |
| <description>Water Coolers supplier - Wenlock Water coolers, Shropshire UK. We sell and rent water coolers to Business, Education and home users all over the UK</description> |
| <language>en-GB</language> |
| <docs>http://backend.userland.com/rss</docs> |
| '; |
| while($pro->fetch()) |
| { |
| $catName = $categoryArray[$pro->category]; |
| $xml .= "<item> |
| <title>". xmlentities(htmlentities(stripSlashes("$pro->name"))) . "</title>\n"; |
| $xml .= "<link>http://www.wenlockwatercoolers.co.uk/index.php?product_id=$product->id</link>"; |
| $xml .="<category domain='main'>". stripSlashes($categoryname_Name). "</category>"; |
| $xml .="<description>"; |
| $xml .= xmlentities(htmlentities(stripSlashes($pro->detail) )); |
| $xml .="</description> |
| <content:encoded> |
| <![CDATA[ |
| <table> |
| "; |
| |
| |
| } |
| $xml .='</table> |
| <br/>'; |
| $xml .="]]></content:encoded> |
| </item> |
| "; |
| |
| |
| } |
| |
| $xml .="</channel> |
| </rss> "; |
| header("Content-Type: application/xml; charset=utf-81"); |
| echo $xml; |
| ?> |
To test it, you can type in the URL to the php file in your IE to validate the XML.
You can use a RSS viewer to view the data of your deed:
http://www.netimechannel.com/OnlineRssViewer/

21/02/10
Making a disk image from a SD Card
I have searched a little Windows program to make a Disk Image from a Phone Micro SD card but couldn’t find one. Therefore I have to put the Micro-SD card into a USB card reader and plug it to a Linux Box.
To make a disk image:
Code: | dd if=/dev/sdb1 of=image.img |
Now if you have a larger SD card and you want to upgrade, swap the card, and run
Code: | dd if=image.img of=/dev/sdb1 |
You need you use the dmesg to find out what’s the device number of your SD Card.
26/01/10
24/01/10
New website launch- cinch.org.uk
23/01/10
Full time web programmer required
|
|