Pages

Subscribe

Wednesday, November 7, 2007

PHP Simple Authentication Using MySQL and PHP sessions

This is the easiest script I have found to use for this sort of thing. simple session-based login / register stuff for a MySQL Database and PHP sessions. it's very customisable too.. even has some info on how to adapt it to use MD5 encryption on user passwords... fun eh?

http://simpleauth.munk.me.uk/

Monday, October 8, 2007

new Asus Motherboard with on-board linux-based web browser

With this system you have an optional linux boot where you can use web, email, VOIP etc. and be up and running in seconds.
http://www.phoronix.com/scan.php?page=article&item=869&num=1

Tuesday, September 25, 2007

rewriting URLS with PHP

An alternative to mod_rewrite for SEO friendly sites:
http://www.tutorio.com/tutorial/php-alternative-to-mod-rewrite-for-se-friendly-urls

here's another tutorial.
http://evolt.org/Making_clean_URLs_with_Apache_and_PHP?from=100&comments_per_page=50

I had some problems with the .htaccess bit of the first one above but that could just be me.

Tuesday, August 21, 2007

Setting up QEMU / KQEMU on Ubuntu 7.04

http://ubuntu-tutorials.com/category/virtualization/

Cedega - for running Windows games on Linux

http://www.transgaming.com/

Run HL2 and Counterstrike on Linux - Wine Gaming!

http://linux.wordpress.com/2007/02/07/wine-gaming-steam-half-life-half-life-2-counter-strike-source-and-16/

Linux Live CD for free gaming!

http://live.linux-gamers.net/

XP performance tweaks

http://kadaitcha.cx/performance.html

Linux Gamers Game List

http://www.icculus.org/lgfaq/gamelist.php?license=free

Create your own linux live CD

PDF HERE - http://www.linux-live.org/create%20a%20livecd.pdf

Open Source Software for Windows - large Database

http://osswin.sourceforge.net/

Free + secure delivery of files (up to 4GB!!!)

http://www.civilnetizen.com/

Tuesday, June 26, 2007

Gadget Blog!

Gadget Blog with lots of videos of new gadgets etc.
here

Tuesday, June 12, 2007

Open Source Flash Stuff

I found a few open source bits and bobs for flash today - please check out the following:

  • Open Source Flash Projects - flash programming, tutorials, etc. + LOADS OF LINKS to open source Flash stuff - Check it out here
  • J Generator - "The JGenerator is a web server production application that dynamically combines text, graphics, and sound to build rich Flash™ content" (also integrates with Flash MX) - The Community Edition is free!!! Take a look here

Wednesday, May 23, 2007

Repairing Windows XP boot problems

There's a great article here

"Bootcfg /rebuild" - there's a command I never saw before. You learn something new every day!

Wednesday, May 16, 2007

Some more Ajax scripts

I've just been sent a link by 2kreative to another great web developer site.

here's the link:
http://www.twinhelix.com/

It's got Javascript, DHTML, and even Ajax tooltips and loads of class other stuff. check it out.

Monday, May 14, 2007

Dual boot HOWTOs

Ok. Here are some of the most common dual-boot scenarios these days:
  • You want to dual-boot XP and Vista (with XP installed first)
  • You want to dual-boot XP and Vista (with Vista installed first)
  • You want to dual-boot XP and Linux (with Linux installed first)
  • You want to dual-boot Vista and Linux (with Linux installed first)
  • You want to dual-boot Vista and Linux (with Vista installed first)
Now all of these things can be troublesome if you don't know what you're doing, a bit about MBR, bootloaders etc. However, there is an answer (probably quite a few)-

You can probably find all the info you need here:
The definitive dual-booting guide

also, a nice related article:
Preparing for dual-booting by doing an image-based backup

Thursday, May 10, 2007

Wednesday, May 2, 2007

Cheap + Cheerful 2.5TB Hot-Swap Array

I found a very nice article on ZDNET about setting up a cheap 2.5Terabyte Hot-Swap Array in a PC that is far speedier that some of todays storage servers costing thousands more.
When I get a few quid, I'll probably make one of these mini servers.....
It looks handy!

the article is here

Friday, April 27, 2007

Sound Archive - lots of WAVS

Hi there, this is a bit pathetic I know but I haven't been on in a while so I thought I had better put something up. There are loads and loads of sound effects at the site below. It's not free but I'm sure you'll come up with something:

http://ultimatesoundarchive.com/sa/display/cat.cfm

Thursday, April 5, 2007

Connect ur XBOX360 to your PC without Media Centre Edition

Ok, maybe I was the only one who thought this but I was under the impression that in order to stream video and music to your XBOX360 from your PC you needed Windows XP Media Centre Edition or vista

I don't have an XBOX360 so I didn't look into it further, until now...

Apparently you can just use Windows Media Player 11 (Windows Genuine Advantage alert!!!) and share all the stuff from the library there. This is in-built into Vista and a quick download for XP.

However, for those of you who don't believe in Windows Media Player (I know I don't!) or for those of you who don't like Windows Genuine Advantage (who does?) you can download Windows Media Connect 2.0 - I found this while stumbling around microsoft.com as you do and there was no download link, just a readme etc. and a link to Media Player 11. Being the crafty cat I is, I quickly googled it and found it on filefront -
http://files.filefront.com/Windows+Media+Connect+2.0+(English)/;5479102;/fileinfo.html

So there you have it folks, it does the lot. Streams music and audio to your DMR, such as an Xbox 360 or Roku SoundBridge. It supports streaming from a seperate UNC network location. It "automatically opens the necessary ports in Windows Firewall and allows you to reset the Windows Firewall settings from within Windows Media Connect." It even supports streaming from a computer on a domain.

More info from Microsoft here

Wednesday, April 4, 2007

Google to launch 3D interactive Internet visor

Yes that's right folks... it seems Google have outdone Microsoft once again.
This time they've come up with some 3D goggles that present "the internet" in 3D.

To cut it short, they've created a 3d world, something like second life, called 3DLife.
In this 3dLife world, you start out in a library, with all the "books" you could need for searching apparently. but you can head out on the streets and visit places like virtual vMTV and Playstation Home
You get your own avatar and at the minute the librarian is played by Sir Ian McKellen. They're looking into getting more actors in on it and soon you should be able to create your own librarians, I'm told. But I'm told this by my over-active imagination so don't pay too much heed to that. Anyway, they're even talking about superimposing ads on your view of the city streets in America. You could be looking at a store and getting ads up about their latest deals. Or you could be looking at a museum and the goggles will give you the opening hours etc... There's even talk of integrating a GPS system and Google maps... We're starting to go into real sci-fi territory here. I'm scared. or am I? I'm not great at making decisions. or am I?

Anyway, check out a very good article here:
http://www.pandia.com/sew/406-googgles.html


also check out Ms Dewey, Microsoft's sexy new search engine girl
http://www.pandia.com/sew/298-ms-dewey-presents-a-new-sexy-search-engine.html

Thursday, March 29, 2007

Email address validation with PHP

Ok this can be a tricky one....
I'm still new to PHP but I tried a number of different links and google searches and I tried these following examples and they didn't work:


ONE I TRIED

$pattern = "/^w[wd]+(.[wd]+)*@w[wd]+(.[wd]+)*.[a-z]{2,7}$/i";
return preg_match($pattern,$email);


ANOTHER ONE I TRIED

if (!preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/" , $email)) {
return false;
}
return true;


Obviously these are functions that I added to my own functions.php that I include in every PHP file I need them in - and the function would be called from said PHP file...... anyway I made sure I fixed all parentheses etc. on the stuff above but neither of them worked for me. They both said invalid email account.

Then I finally found one that works.... it's simple, I mean it just checks the format of the email address rather than opening a socket connection to the mail server to see if it exists. But it does the job for me

It's available at
http://www.ilovejackdaniels.com/php/email-address-validation/

Thursday, March 22, 2007

Libchart - Simple PHP chart drawing library

Like my previous post on PHP/SWF Charts, libchart is for drawing graphs, bar charts, pie charts etc. in PHP - but it doesn't use flash, it generates PNG files and as far as I know that's it but that should do the trick.

it's available at
http://naku.dohcrew.com/libchart/

PHP on the command line

If you want to run .php files from the command line,
eg. for file manipulation with no browser output or whatever, check out
http://theopensourcery.com/phpcommandline.htm

To elaborate, I used to use freebasic or qbasic for programming little scripts that convert between one type of ascii data file and another. I used to read in a .CSV file into freebasic and check each line for commas and seperate the text - it was painful. Since I've learned a bit about PHP I can now use the Explode and implode commands in PHP - Explode will take apart a line of text that's seperated by commas, tabs, newlines, whatever you specify, and it will create an array for you with all the data. It makes the type of programming I did a million times simpler. For this reason I wanted to get PHP working on the command line. Now I can read in csv files and stick them on a MySQL database with ease.... ah how I love programming. I can also use the windows command-line "at" command to schedule the run of PHP. Of course this is all slightly different on a Linux box with "cron" being used instead of "at" etc. and the PHP command line parameters might be different. but you get the idea.

Oh yeah "implode" does the exact opposite of "explode".

Something to watch out for:
Check your PHP.ini - the line that says "extension_dir ="
For example, on my system I use uniform server, which I'll explain in another post.
I keep my uniform server on d:\uniserver so the line line in my php.ini said:

extension_dir="usr/local/PHP/extensions"

This meant that the extensions couldn't load from my current path where I was keeping my PHP files

How I got it to work was as follows (this will be different for you depending on where your copy of PHP is stored):
  1. I made a copy of my php.ini into my D:\ (anywhere will do)
  2. I changed the line to say extension_dir = "d:/uniserver/diskw/usr/local/PHP/extensions"
  3. Then if I'm in a directory and I have a PHP file called 1.php I could run PHP like so:
d:\uniserver\diskw\usr\local\php\php.exe -c d:\php.ini 1.php

It would echo out any echo stuff from within the PHP to the console, and will run any MySQL queries or whatever. It's nice. If you have any trouble with it, you can email me on thedavil@gmail.com

Qbasic for beginners!

Maybe I'm taking a step backwards here but I thought this was a very good resource site for the BASIC language. more specifically qbasic, but the beginner variable stuff etc. should be mostly good for freebasic and maybe even beginners VB. if you're interested in basic at all, check out the site below.

http://www.petesqbsite.com/sections/tutorials/beginners.shtml

Free stock photos!!!

Check out the license for each individual image but I'm pretty sure if you want to use these photos on your website you can as long as you're not selling templates with the images contained therein... anyhow like I said, check the individual image license.

the site is http://www.sxc.hu

Tuesday, March 20, 2007

Using steam to cool computers!!!

"The exterior of the device is a copper sleeve that absorbs heat from a processor or a hard drive.

The interior consists of a series of vacuum-sealed chambers and channels containing small amounts of water. The water turns to steam, which then conducts the heat from the source to another component, such as an aluminum heat sink, that can dissipate the heat into the ambient atmosphere."

check out the full article here

Playing Unreal Tournament..... with your mind!!!

Thoze crazy scientisty people over at OCZ have figured out an interface for your pc that lets you control video games with your brain.

"OCZ´s latest brainchild is the Actuator, a device which tracks movement of your eyes, monitors brain waves and picks up facial muscle movements, it uses these recorded signals to link them to input commands on the computer, allowing you to play Tetris or even a first person shooter like UT2004."

check out the full article here
http://www.madshrimps.be/?action=getarticle&articID=551

Props to Cully for sending me this link

Car PC - my other blog

My friend Gary and I are involved in a project to setup his car with an onboard PC with the following features:
  • Cheap GPS system
  • Dvd + multimedia / audio system
  • Wireless internet access (WIFI)
  • Full control over mobile phone
  • Reversing Camera
and lots more to come....

If you're interested in the idea fitting a PC or laptop in a car,
check out
http://car-pc-ireland.blogspot.com/

Thursday, March 8, 2007

URL re-writing with Apache

If you value your website's security, it runs on Apache, and you don't know about URL re-writing you really should check out a really good article about URL re-writing here
There are also many other great reasons to read the article below.

Anyway, basically it shows you how turn this:
http://www.flibbidyjimjams.com/floogle.php?cat=flib&action=cake

into this:

http://www.flibbidyjimjams.com/floogle/flib/cake

and this means that hackers don't even know if you're using ASP or PHP, which is a hurdle straight away. There are also many other fine uses. One pointed out to me by 2kreative is to redirect a .jpg url to a .php - this is useful if you want a dynamically created image for your forum signature, for example, and the forum image posting rules block .php - "haha nice one" I hear you say!!!! yeah well don't be using it for hacking purposes. that's evil.
By the way to quote 2kreative
"you should refer to apaches own documentation to see how in-depth it really is"

Dynamically resizing images {Mike Lopez}

Mike Lopez has some really good PHP tutorials on his blog.
Come to think of it he's got a great tech blog, full stop.

Here's one I find very handy for dynamically resizing images {bascially, it cuts down on bandwith and storage space by processing your images on the server end and just passing the thumbnail data to the user}
check it out here


PHP newbies - don't rush
How to setup your Apache / MySQL / PHP Development environment
Cheap Web Hosting 1
Cheap web hosting 2
Preventing Contact Form Spamming
PHP form to email script
Uploading files in PHP
Using PHP sessions
PHP Date tricks
Google Earth for Linux
How to setup samba and Autofs
Setting up Lan over internet
Orage - Mike's Calendar Tool of Choice
Really Free Ipods
Paypal Phishing
Free Cable TV via the Internet on Linux
Feedburner Wordpress plugin

he's got tons more on his blog but I didn't have time to index them all so check it out as soon as you can... unless you're not interested in this sort of stuff. but in that case, why are you even reading my blog? :-D

use PHP to create Flash charts and graphs

Do you know what's top class?
PHP/SWF Charts!!! that's what!!

Basically, you feed it info from your PHP, be it from a text file, database, whatever (use your imagination here folks) and then it makes lovely Flash charts for you!! And best of all, it's free (well, almost)
"The free, unregistered version contains all the features except for:

* Clicking a chart takes the user to the PHP/SWF Charts web site
* No displaying charts inside another flash file
* No technical support, and no product updates by e-mail"

But it's still top class.... the limitations above aren't that bad at all.
it's only $45 for a single license and with that you get a few more nice features (check the website for details)

Anyway, you can find it here

And Guess what? For once, I found this all by myself! me! yay!

Move over Google Desktop - here comes launchy

If you have vista you probably have no need for this as the start menu does it anyway but here goes:

Ok anybody who's heard of Google Desktop or uses it knows that it indexes all your documents and links and programs in a big database (this takes a long time initially), then when you want to find something fast you just type part of the name into Google Desktop and it finds the document or program quick-smart... However there are some debates ongoing about your privacy when you use Google Desktop. As far as I know there may be some info that gets sent back to google about your searching habits. But I've only heard rumours. I was far too lazy to research it so don't take my word for it - go check it out for yourself to be sure.

Right.....
Here's the replacement ......

LAUNCHY
You can find it here

It's great... It has a funny name, it launches your documents, favourites, apps etc. and it doesn't take 50 years to index them all. You can be very specific about which folders to index (although I think that's possible also with Google Desktop) - It's better though, because at the start it only indexes the important stuff, and you can add as you need, whereas Google Desktop indexes everything by default (I think). Anyway one way or another, whether I can form coherent sentences or not, you should check it out.

As usual, 2kreative pointed this out to me. Dat fella sure finds some great stuff out dere.

Monday, March 5, 2007

Irish Webmaster Forum!!!

I didn't even know there was one of these - but you can check it out here

Thursday, February 22, 2007

Microsoft BSOD screensaver!!!

Microsoft taking the piss out of themselves - they made a "Blue Screen of Death" screensaver
I don't know how long ago. But this is hella funny! You can download it here

Nice vertical bar graphs with CSS and PHP

Check out a tutorial here

Gmail and Google hacks

There's a great list of utilities and hacks for gmail and google on this page:
http://www.blinklist.com/tag/gmail+hacks/

Tuesday, February 20, 2007

Multi-column output from a database with PHP

If you have large tables of info coming from a database and you're using PHP - what you need is some sort of code to format the table for you. There's code below for both horizontal and vertical multi-column output. This can be very useful in many websites.

here's the link (2kreative sent me this)
http://codewalkers.com/tutorials/15/2.html

PHP - Login / Logout With Sessions

Imagine you're starting a PHP website and you want to have a member's area where your members can login and maybe upload pics / post text / whatever. Rather than ask their username + password on every single page they visit it would be best if you had them logged in for a "session", and this session would stay logged in across any pages they visit until they logout or a given maximum time limit (you need to have them log out some time for security reasons)
Anyway, PHP, being the amazing language that it is gives us tools to work with sessions and once you get used to it, this can be a great addition to your site.

Here are a few great tutorials / scripts for setting up a login + logout / members area based on sessions on your site:

http://phpsense.com/category/PHP-Sessions/
http://www.tizag.com/phpT/phpsessions.php
http://www.phpsimple.net/tutorials/login_logout/
http://simpleauth.munk.me.uk/
as usual, props go to 2kreative for most of these links.

Tuesday, February 6, 2007

Another Ajax tutorial !!!!

Ok I forgot to mention good old tizag.com
they have a great tutorial on AJAX here as well as the MySQL and PHP tutorials I mentioned in an earlier post. They also have great sections on HTML, CSS, Javascript, Perl, ASP, VBscript, XML, Flash and probably more to come. This site taught me PHP in no time at all. Their no-nonsense examples really helped me out.

Nice Ajax / JavaScript library

I'm lazy, so I took the following description from the home page:
"An open-source JavaScript library for creating rich internet applications. Rico provides full Ajax support, drag and drop management and a cinematic effects library."

you can access the website here

Wednesday, January 31, 2007

Getting started with Ajax

Ok so you want to get into the basics of Ajax? Maybe you've heard of it, maybe not.
If you haven't, basically it's a way for javascript to load information into a page without the page refreshing. This looks more professional and can be extremely useful in a database driven website, such as the kind I would prefer to make in PHP and MySQL

In my case, I'd use Ajax to call a seperate PHP page that would give back info, such as maybe database info or info from a file. the latter would be less preferable as if the site were dynamic with many users changing a file mid-read could case problems, especially on Windows servers. {I'm guessing here but I like to be cautious}

Anyway here's an example of how I would use Ajax:

I'm presuming you've used PHP + MySQL before but if not read on anyway and you might find some of this interesting.
I'd have one PHP or even HTML file with a form, some textareas or list boxes or whatever. When you change the text in one area, or select something from a listbox, it would run a seperate PHP file. This PHP file would be setup to connect to my database and get the info needed based on a given parameter, eg.
dav.php?id=12

this would run the PHP which would go and get the info from the database for id 12
so then I could populate a textbox or another listbox on my main HTML page and voila - you've got a professional, dynamic, interactive, database-driven application!!!!! even typing those words makes me squirm but that's basically what you're doing

Now obviously these are just the basics but Ajax can prove very powerful.

You'll need the code for doing what I said above, and I found a good guide to getting started here

Tuesday, January 30, 2007

Connect your google talk to Aim, Msn, Yahoo etc.

I saw an article here about this. Check it out if you're interested in that sort of thing

Monday, January 22, 2007

Free PHP Video Tutorials!!!

Leighmac, a web developer from Australia, has put up a few free video tutorials on www.phpvideotutorials.com and they're very good. The sessions tutorial was very helpful for me anyhow. You can donate if you want and this is how you get the guy to do more tutorials. Handy if you're learning PHP. refer to my earlier blog post here for text-based tutorials that get in-depth into mysql etc.

Monday, January 8, 2007

Using Bart’s PE Builder to Make an Anti-Spyware and Rescue CD

Ever have to clean spyware from your PC or someone elses? Wish there was a more complete way of cleaning your system from outside of Windows? Bart PE is basically a build of Windows XP that runs directly from a CD. in this manner it cannot be affected by viruses or spyware so if you add enough scanners and utilities this CD could come in very handy.

Remember this CD is definitely best created on a working, virus-free pc.

The guide is here -
http://www.irongeek.com/i.php?page=security/pebuildertutorial

props to Adrian Crenshaw for this excellent guide. I have used this guide to create BartPE cds in the past and have been very successful in cleaning viruses from all kinds of machines, from "not too sick" to "dead as a dodo". There are a lot of great addons for Bart PE - just take a look at
http://www.bootcd.us/BartPE_Plugins_Repository.php
and
http://smithii.com/bartpe_plugins
and
http://oss.netfarm.it/winpe/

I always install everything Adrian recommends in the main part of his guide, plus the following extras he mentioned to my build:
HWPnP - for hardware detection post-boot.
Registry Editor PE for editing the registry a little deeper than Ad-Aware or HijackThis allows.
Eraser - for cleaning the drive of all data.
Firefox - for obvious reasons.

I also like to add Security Task Manager to the mix

Wednesday, January 3, 2007

Cheap + basic Nokia mobile phones (sim-free)

Do you want a very simple mobile phone (sim-free) ?
  • Black and White screen etc.
  • It can call people and send SMS and that's about it?
I found a Sim-Free Nokia 1110i - approx €43.13 here

Do you want a decent phone (sim-free)?
  • SMS
  • MMS
  • Bluetooth
  • Infrared
  • GPRS
  • Email
  • Tri-Band
  • Java
  • no camera unfortunately
I found a Sim-Free Nokia 6021 - approx €125.21 here

I used to have a 6021 - they're ok. I got one free from work. Don't expect any java program to be able to use the infrared to remote control your TV though - I found out the hard way that's only going to happen with Symbian or Windows Mobile. incidentally that's one of the reasons I went for the UBIQUIO 401 smartphone, although ironically it doesn't have Infrared at all. maybe I'm a bit mental but I just loved all the features of the 401. Except the battery life. it's worse than my ipod!!!!

I have ordered from this site before [blueunplugged.com - in the UK] and they ship to Ireland. I've had no problems with my orders from them.
The site has an option to show approximate prices in Euro.

Bluetooth Ipod with a big touch screen??

It's quite possible a bluetooth enabled ipod is in the works.
check out the possibility here