Category Archives: Internet

Animated Div Collapsing

A few years ago I was looking for a simple JavaScript to animate the hiding/showing of a div. I came across one that was perfect from harrymaugans.com but the site is currently undergoing a revamp so the original post is no longer there. Anyway the script was perfect but it had one issue, it required that the div’s height be already set and I was working with dynamically populated divs that I wouldn’t know the size of. My original solution was to loop through the divs I was going to hide and set their height to what their height currently was (if that makes sense) before hiding them with display: none;. Anyway I got sidetracked and I felt this solution was inadequate anyway so left it in my test folder. Jump to the present day. I started looking at it again and realised I can grab the original height of the div once it’s display had been changed back to block by the script and it’s height set to 1px ready for the sliding into view. The solution was simply to use scrollHeight which gets the height of a div including any hidden content such as when overflow is set to hidden.

I also added a new function, toggleSlide, which means instead of needing a link to call the slideDown and then one to call the slideUp you can just call toggleSlide and it will either slide it up or down depending on it’s current state.

And so I am offering my version of the script here since I think some people might be in the same boat as me and find my solution useful and also because the original source is no longer available.

Read more »

Sending email via SMTP using PHP

A couple of my users contacted me to say that their host had disabled sendmail and required any scripts they use to now use SMTP to send emails. This resulted in me quickly reading all I could about SMTP and the result is this slightly rough script I am sharing. It’s pretty self explanatory. Put your SMTP server details in the $mailCfg array. Next simply call the smtpMail function which uses the same variables as the standard PHP mail() function but with two additional variables. The additional variables are the email address we are sending from and $mailCfg. I could of put $mailCfg as a global but this way you can include the script in a different script and store the required information where ever you want. The from address is important as most SMTP servers will reject the message if it’s not included.

Just remember the code is far from perfect and was created to do a simple job.

It also has one nice extra function you might find useful… Read more »

Do One Hundred Push ups

We all need goals to aim for and I’ve found a new one for me. To do 100 push ups (press ups to us Brits). I was inspired by the website Hundred Push Ups which breaks it down in to sets. It’s five sets per workout, three work outs a week and it’s set over six weeks. They also have an online log for you to keep track of your progress as well as publish it on Facebook and Twitter if you wish.

They also have Two Hundred Sit Ups, Two Hundred Squats and Fifty Pull Ups if push ups aren’t your thing.

The Great Google Chrome Con

Google Chrome is now at version 5 despite being only four years old. Version 6 is in beta. Before I began my rant I just need to explain how the versioning of programs usually works. The first number is the major build number should only change when there have been major changes to the program. The smaller numbers are there to indicate smaller changes such as security and bug fixes. Since it’s release Chrome, as far as I can see, has only had two major changes to it and they are the addition of themes and extensions.

Firefox has been around about eight years and is only at version 3.5. Opera has been around over ten years and is only at version 10.50. With both of these browser they have only changed the major build number when they have made major changes to their browser.

So why is Google increasing Chrome’s build number more often that it has birthdays? Well others believe this is Google’s attempt at making the gullible believe that Chrome is a more mature program than it actually is. The less computer savvy are going to look at it and think, “Oh it’s on version 5 so must have been around a long time”. I tend to agree with their opinion as there is no other reason for Google to be doing this.

Free ebooks

I just thought I would share some of the sites I have found for downloading free ebooks. That is fiction ebooks and not reference ebooks as there are hundreds of sites offering reference ebooks as PDF files. With a few of the sites below they are just hosting ebook versions of classic books that are now out of copyright. Most sites just use the books from Project Gutenberg and reformat them for better reading. Quite a few of them give you a choice of what format you want to download the ebook in be it PDF, epub or just plain old txt. If you are looking for more original and modern stories to read then I recommend the first two links, Online Novels and Feedbooks.

Online Novels – Just discovered this excellent source of free ebooks novels.
Feedbooks – Not only does this site have the classics it’s also a good place to find new and original works.
getfreeebooks – Haven’t tried this site yet but looks promising.
ManyBooks – not looked at this site much but seems to have a good mix of classics and modern works.
Project Gutenberg – The main source of classics and they have their own proof readers. Poor formatting in their ebooks though.
epubBooks – Classics from Gutenberg but formatted for better reading and all in the epub format.

MobileRead also has a forum dedicated to free ebooks.

If you are lucky your local library might support the lending of ebooks using Overdrive. Have a look at http://search.overdrive.com/ to see if your local library is part of it.

Anyway if you know of any good sites for free ebooks from new authors then please share them.

Spyware Block Lists

For years now I have used both SpywareBlaster and SpyBot to immunise my web browsers against malware. They both do this by adding a list of known malware sites to the blocked list of your web browser and, in the case of Spybot, also adding them to the hosts file. They also help to stop tracking cookies which are used to log what type of websites you visited.

Anyway I was updating them both today and I got to thinking, "How often do they check that the sites in their block lists are still active?" At present SpyBot is saying it has immunised me against 130712 sites and SpywareBlaster says 13138 sites. So I decided to test a random selection of 20 sites they have blocked. Out of the 20 all the domains had now expired and pointed to nothing (resulting in a oops message in the browser) or they were now a domain landing page. That’s one of these stupid pages you sometimes end up on when you mistype a web address which has a list of links loosely based upon the domain name.

I know both of these programs are free but would it be to hard for them to write a program that checks their list every so often to remove dead domains? The reason I say this is because Internet Explorers block list is stored in the registry and this can slow down your computers boot up time. Also the more sites are blocked the slower your web browser may become. SO come on programmers. Just write a program that runs through your list once a month and see if they are still active or not.

Another Day, Another Internet Explorer Exploit

When Internet Explorer 8 came out Microsoft said they had seriously improved security and that it was now one of the safest web browsers to use. Apparently they were wrong. According to the Guardian newspaper here in the UK an exploit in Internet Explorer was used in the recent attack on Google’s systems in China.

source

So why keep using it? There are plenty of excellent alternatives these days. Firefox, Opera, Chrome, Flock and you could even use Apple’s Safari although it uses a stupid amount of memory on Windows.

Install Several Programs With One Installer

Some of the software Ninite offers

Some of the software Ninite offers

Have you just installed/reinstalled Xp, Vista or Windows 7? Need to install programs but don’t want to sit there manually installing them? Then try Ninite Easy PC Setup. Ninite makes installing multiple applications simple. You just go to their site, select the applications you want to install and then click Get Installer at the bottom. It will then download a small program which you will need to run as administrator so it can install the programs. The installer then downloads the install packages for your chosen programs and silently installs them. You can even suggest other programs for them to add to their list. They promise they only install the chosen program and not any of the rubbish a lot of the program installers try to add such as toolbars.

“We install apps with default settings and say “no” to browser toolbars and other junk.”

So basically you
1 – Go to the Ninite Easy PC Setup site.
2 – Select the programs you want to install.
3 – Download their installer.
4 – Run the installr as administrator.
5 – Go do something less boring whilst their installer does all the work for you.

Just to add you will need cookies enabled to be able to download the instaler.

Facebook Wins $711 Million From Spammer

Facebook has won a court case against a spammer who was abusing their site to send spam to Facebook users. The spammer known as Spamford, real name Sanford Wallace, is also facing prosecution for criminal contempt of court which could result in prison time. Wallace has also previously been prosecuted by MySpace for abusing their site to send porn and MySpace was awarded $230 million.

[source]

Chrome OS now in beta

Fancy trying the new OS that Google is working on? Well you’re out of luck but in the meantime you can try the Chrome OS that for some bizarre reason Suse has made and released on a Google hosted site http://sites.google.com/site/chromeoslinux/ (Google has taken the site down). What’s really funny is the amount of people that have been Tweeting about how either this is Google’s new OS or the rest that are calling it a fake. It’s not a fake as it really is an OS called Chrome OS it’s just people have been fooled by the sites design and hosting in to believing it is Google’s OS.

From the site:

2009-10-21: New Chrome OS 0.4.223 beta is available now!

Chrome OS is a brand new free operating system built around the revolutionary Google Chrome browser.
The project aim is to provide a lightweight Linux distribution for the best web browsing experience.
Featured software in Chrome OS:
  • GNOME 2.24 desktop environment
  • Google Chrome 4.0.223 web browser
  • Google Picasa 2.7 photo manager New!
  • OpenOffice.org 3.0 office suite
  • GIMP 2.6 image editor
  • Flash Player 10.0 plugin
  • and much more!
System requirements of Chrome OS:
  • Processor: Intel Pentium, Xeon or newer; AMD Duron, Athlon, Sempron, Opteron or newer
  • RAM: min. 256 MB
  • Hard disk: min. 1 GB
  • Graphics card: supports most modern graphics cards

Why they would try to make people believe this was Googles forthcoming OS I don’t know.

Post Popularity Graphing by Knowledge Ring