Author Archive

Your browser’s address bar (URL bar) can be used to inject JavaScript code directly into the webpage you are visiting without reloading the page. The following codes are useful to do cookie editing:

First, visit the targeted webpage and inject the following code to view realted cookie’s fields and the values assigned to them.

javascript:alert(document.cookie);

Second, to edit a certain value use:
Read the rest of this entry »

Hubs, Bridges, Switches and Routers are used to build networks. If you are trying to design your own LAN (Local Area Network) at home, then you probably need to know what they do and the main differences between them. I will try to cover all that in addition to some networking details to cultivate the article and provide better understanding of how the internet works. After all, always remember that the internet as you know it is nothing more than a network of networks!

Read the rest of this entry »

This article covers an important limitation of FAT32 and introduces exFAT as an alternative along with a small history of the File Allocation Table (FAT) file system.

It is the oldest file system for Windows OS and is mainly designed for removable media. It first came out as FAT12 (12 refers to the size ‘in bits’ of the FAT entries in the actual FAT structure), and by the time as the storage media size increased, more types were developed to increase the number of bits, so we got FAT16, FAT32 and finally exFAT (Extended FAT aka FAT64).

While, FAT12 was designed for small media at its time such as Floppy Disks, exFAT was introduced by Microsoft to best suit USB Flash Drives now a day.

FAT is good for removable media because it is considered to be a light-weight file system due to its simplicity (e.g. it was not designed to support security or access rights). Nevertheless, FAT can be recognized by outdated systems, for instance, FAT12 and FAT16 are recognized by all operating systems from MS-DOS forward and FAT 32 from Windows 98 forward.
FAT16, FAT32 and exFAT may be used for Hard Disks for storage purposes or even for Windows installation, but this will be on the price of losing NTFS benefits. However, Win98 does not support NTFS, so its case is different. Read the rest of this entry »

To enter BIOS you first need to restart your computer and read the BIOS entering setup message to follow the instructions, because what you need to press varies from one computer to another.

For a reason or another, some computers are configured to show a Logo or a picture on start up instead of the usual setup message. When that logo shows up, press Esc or Tab to remove it.

If your computer does not pause enough time to read your BIOS entering setup message., you may pause the screen by pressing the Pause/Break key on your keyboard. Press any key afterwords to unpause your computer.

Here is a code to detect weather the visitor if your webpage is using ie or not:

1
2
3
4
5
6
7
8
if (isset($_SERVER['HTTP_USER_AGENT']) && 
    (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)) 
	{
	echo "You are using ie";
	}  
	else { 
	echo "You are not using ie"; 
	}

I am using this simple PHP code while developing HybridPass, a new authentication tool for web applications. My Javascript is only compatible with ie at the moment, so until I develop it more to support other browsers it is important to give my visitors the right feedback.

array_rand can be used to select a list of values randomly. This helped me to code a server side script to display a random grid of pictures as part of a project. These pictures changes every time the page is requested or refreshed.

Read the rest of this entry »

Who doesnt need to implement a data validation technique along with every online form?

Bellow is a basic javascript code to check that no form is submitted with empty fields:

Read the rest of this entry »

Charset Problem

The image above is showing part of a small hack I coded for a phpBB board to show topics from selected sections. Those question marks were suppose to be Arabic letters, but after a recent update to phpBB the hack failed to use the board config file to connect so I had to set up my own direct connection to the DB.

The connection was fine, but I got “?????” instead of something I can read in Arabic. After some tests I figured out, though the MySQL DB is using UTF-8 as a character set, which means it can handle the language efficiently, I had to set the character set to UTF-8 via PHP for every query using the following code:

1
mysql_query("SET CHARACTER SET utf8");

What is even better is setting the character set at once with a single line of code for the whole connection by using the following code:

Read the rest of this entry »

As part of an experiment for testing a new authentication mechanism for web applications (will post more about it sometime in the future) I needed my users to select only four images out of many while filling a form.

I used a CheckBox beside every image and developed a JavaScript code to limit the number of checkboxes allowed to be ticked.

Read the rest of this entry »

Haider’s WebSpace
Welcome to my technical blog. This is where I write, archive and share computer related articles. Subjects vary from posting technical solutions to researching particular topics. Feel free to comment and talk IT!
Sponsored Links
My Tweets
Posts Calendar
May 2012
M T W T F S S
« Mar    
 123456
78910111213
14151617181920
21222324252627
28293031