Tutorial - How to use arrays in php

June 26, 2008 – 8:00 pm

Using arrays in PHP can be a very powerful technique of handling data.

If you are not familiar with arrays in PHP then use simple code!

Example of simple code.

$fruit['apples'] = 'I like apples';

$fruit['oranges'] = 'I like oranges';

$fruit['banana'] = 'I like bananas';

Example of advanced code.

$fruit = array("apples" => 'I like apples', "oranges" => 'I like oranges', "banana" => 'I like bananas');

Using advanced code saves lines in the source code but if you are not familiar with arrays it could be harder to troubleshoot if you get parse errors.  Once you feel confident with arrays then I would recommend using advanced code.

Reading from arrays.

Arrays are very simple to read from.  Using our example code above, to see the value of Apples we would use

echo $fruit['apples'];

this would return: I like apples

Looping through arrays

Looping through arrays is easy too, but this is where people usually get stuck.  Just look at it from a logical point of view.  We are going to use the foreach function to go through the array.

foreach($fruit as $key => $value) {

echo $key . ' : ' . $value . '<br />';

}

This would return:
apples : I like apples
oranges: I like oranges
banana: I like bananas

Using the foreach function above, think of $key as the name and $value as the information we assigned.

If you would like any more information regarding arrays then please leave a comment or visit the PHP manual by clicking here

Share/Save/Bookmark

How to stop spam - junk mail

June 25, 2008 – 8:20 pm

Sick of receiving emails with the following subjects: tramadole, buy tramadol, online casino, buy soma, buy viagra, buy viagra online, cheap viagra, tramadole online etc…

Everybody suffers from spam at some point, so here’s some tips on fighting spam.

  1. Be very careful entering your email address on websites.  Some websites sell this information on to advertising company’s who then spam your inbox.
  2. Keep your personal/business email account separate. Get your self a free Hotmail account at http://www.hotmail.com and use it for filling in on-line forms.
  3. Google’s Gmail has the best Junk Mail filter I have ever seen! Creating an email address with Gmail is free and I would highly recommend this.
  4. RING THE INTERNET SERVICE PROVIDER. Ring your ISP whether it’s BT, Tiscal, Aol etc and see what they have to offer.  If they try to sell you anti-spam software then DO NOT ACCEPT.  Software based anti-spam filters work by looking at the emails once they are downloaded on your computer, we want it to be deleted BEFORE you download it!
  5. If you own a domain based email address such as matt@mybusiness.com, contact who ever hosts the email and tell them your problem.  If they have access to the machine/server hosting your emails they should be able to install anti-spam software such as Spam Assassin.  Ask them about this.

Please note this is just a small guide on how to prevent spam. If everything fails, why not just create a new email address?

Share/Save/Bookmark

The best media player for Windows Mobile

June 25, 2008 – 3:12 pm

I have played with many different media players on my Windows Mobile device and so far the best I have come across is CorePlayer.

If you have a HTC Kaiser then you are most likely aware of the display drivers performance issues(If not click here).  CorePlayer has a special option to help target this problem and increase the performance and it really does help!

The lastest version of CorePlayer comes with an in-built YouTube browser that is really effective and easy to use.

Click Here to download or view CorePlayer

Coreplayer YouTube browserDetailed videosCoreplayer playing a videoCoreplayer HTC Kaiser driverCoreplayer Library

Share/Save/Bookmark

Delete your computers history and temporary internet files

June 25, 2008 – 12:56 pm

CCleaner is a free program that specializes in deleting all your computers history, temporary internet files and cookies. If you have never ran a clean up procedure before then you will be amazed in the amount of junk this will remove.

How to delete the temporary internet files, history and cookies.

  1. Download CCleaner V2.08 installation here ( Latest version as of 25/06/2008 is v2.08 ) If you would like to check for the latest version then click here http://www.ccleaner.com/download/downloading
  2. Once the file has downloaded, run the installation.
  3. Click Next >
  4. Accept the license agreement by clicking I Agree.
  5. By default the installation will install CCleaner into the program files, [RECOMMENDED] if you are happy with this click Next >
  6. The installation will try to install the Yahoo Tool bar and add some Windows Shell Extensions which are not required, However if you would like to support this great program then leave the Add CCleaner Yahoo Tool bar ticked. I personally would leave it not ticked as I hate unnecessary tool bars.
  7. Click Install.
  8. Click Finish - CCleaner is now installed.
  9. You can access CCleaner from the Windows Desktop or from the Start Menu.
  10. On Windows Desktop the icon will appear like this.
    CCleaner Icon
  11. Double click CCleaner on the Windows DesktopCCleaner Menu
  12. If you want to delete all history on the computer I would recommend ticking all the boxes, ignoring the warnings and then click Run Cleaner

If you let Internet Explorer remember search information, user names or passwords then I would recommend not ticking the “Autocomplete Form History” box.

CCleaner can also be used as a registry cleaner. Click the Registry icon in the menu to use this feature.

Thanks to Piriform Ltd. for creating this great application.

* CCleaner stands for Crap Cleaner :)

Share/Save/Bookmark

Faceparty goes on strike!

June 24, 2008 – 6:41 pm

Faceparty.com the social networking website, has gone on strike today against its users over people complaining about free features not being given to them -  Credits to Jack Thompson for pointing this out.

Click the image below to view what the Faceparty.com homepage said

Faceparty.com's awesome English

Maybe the competition of Social networking sites is getting too much for Faceparty.com with the rising popularity of Facebook.

Share/Save/Bookmark

TomTom 7 for Windows Mobile

June 24, 2008 – 5:36 pm

It has recently been reported over at xda-developers.com that TomTom 7 has been shipped with some HTC Diamond phones.  This has allowed users to extract the TomTom 7 and put it up for download.

Screenshots of TomTom7

Click here to view the article and download TomTom 7 for Windows Mobile

Resources

http://pocketnow.com/index.php?a=portal_detail&t=news&id=5471

http://forum.xda-developers.com/showthread.php?t=401679

Share/Save/Bookmark

Google Android for Windows Mobile

June 24, 2008 – 5:00 pm

Google AndroidI have recently been testing Google Android on my HTC Kaiser mobile phone.

The HTC Kaiser may also be known as o2 XDA Stellar, MDA Vario III, HTC TyTN II etc.

It looks great however I cannot seem to get it to work with my wireless connection. So I am very limited to what I can do.  There is many beta testers out there who have had much more success then I have and if you are interested in giving it a shot you can download all the relevant tools at the Xda-Developers forumClick here to view the thread http://forum.xda-developers.com/showthread.php?t=396782

Here are some screenshots.

Google Maps

For more screenshots visit here http://pics.roffnoppe.de/android-m5/

Resources

http://forum.xda-developers.com/showthread.php?t=396782

Share/Save/Bookmark

Knight Rider GPS System with authentic KITT voice

June 24, 2008 – 2:08 pm

I used to LOVE watching Knight Rider as a kid and I still do now! :) That is why I have posted an article on this great gadget.

MIO.com

mio.com

mio.com

Creator: MIO

It’s fun from the first time you hit the power switch,  KITT instantly asks you “Hello Michael, where do you want to go today?”

Using the authentic William Daniels voice!

This unit is not available yet, price is expected to come in at £140.  Mio are yet to release any actual hard details on the GPS’ capabilities - mapping, media playback, that sort of thing - since they know that all we care about is KITT’s voice.

For more information on this item Click Here

Resources

http://www.slashgear.com/mio-knight-rider-gps-with-authentic-kitt-voice-2312200.php

Share/Save/Bookmark

Facebook overtakes Myspace

June 24, 2008 – 12:42 pm

According to comScore, Facebook pulled in 123.9 million unique visitors in May, beating MySpace’s 114.6 million.  Facebook is growing at a rapid rate!

* comScore is an internet marketing research company that provides marketing data and services to many of the internet’s largest businesses.

Take a look at the statistics below. (Click the image to view a larger copy)

Share/Save/Bookmark

NASA digs up ice on Mars and its evaporated!

June 23, 2008 – 11:46 pm

Did you know NASA currently has two rovers (Spirit rover and Opportunity rover) and one lander (Phoenix Spacecraft) on Mars.

The Phoenix spacecraft landed on Mars on the 25th May 2008 and recently beamed back images of a trench dug up by its Robotic Arm.

The colour images were acquired by NASA’s Phoenix Mars Lander’s Surface Stereo Imager on the 21st and 25th days of the mission, or Sols 20 and 24 (June 15 and 19, 2008).

* A sol is a term used to refer to the duration of a solar day on Mars = 24 hours, 39 minutes, and 35.244 seconds

These images show ice in the trench informally called “Dodo-Goldilocks” over the course of four days.
In the lower left corner of the left image, a group of lumps is visible. In the right image, the lumps have disappeared, similar to the process of evaporation.

Ice on mars!

To view more information regarding ice on Mars Click here

Other Interesting facts about Mars

The Spirit rover landed on Mars on the 4th January 2004 and it lasted 779 sols (This rover is no longer operation due to equipment failures, it can only be used to brush targets)

The Opportunity rover landed on Mars on the 25th January 2004 and is still functional however there is a lot of dust on its solar panels which is causing problems, it is also experiencing equipment failures.

Both Spirit and Opportunity took stunning photos of Mars.

Click the image to view a larger version.

Taken by Opportunity
To view more photos including high definition photos of Mars Click here

To read more about Mars Exploration missions Click here

Resources

http://www.nasa.gov/mission_pages/phoenix/main/index.html

http://en.wikipedia.org/wiki/Exploration_of_Mars

http://en.wikipedia.org/wiki/Mars

All Materials are Copyright of their Respective Rightful Owners.

Share/Save/Bookmark