Random Password GEN (PHP Format)

This little PHP script, yet powerful, was programmed months ago, just to generate random – password and nothing else. But, to be truthful, this project does give me physical stress and nearly drive me against the wall! I am not joking…

Now have fun and don’t get addicted. It may hook you like a fishing rod!

—————
What You Need: Notepad Plus & Cpanel Hosting

1.] Execute ‘Notepad Plus’ and copy this script. But, don’t forget to save it as ‘php’ format. Here is an example: ‘pass-generator.php’

<META HTTP-EQUIV=Refresh CONTENT="5">
<?php
function GenPassCK($minLength = '16', $maxLength = '16', $maxSymbols = '6')
/* Please Do NOT Modify Any Of The Settings Beyond This Comment! */
{
    $symbolCount = 0;
    srand((double)microtime() * 1000003);
    for ($i = 0; $i < rand($minLength, $maxLength); $i++) { do {
            $char = rand(35, 124);
            	$symbolCount += $isSymbol = (!in_array($char, range(48, 57)) && !in_array($char, range(65, 90)) && !in_array($char, range(97, 122)));
            		if ($symbolCount <= $maxSymbols || !$isSymbol) { break; }
        } while (true);
	$passwd = sprintf('%s%c', isset($passwd) ? $passwd : NULL, $char);
    } return $passwd; }
?>

<?php echo GenPassCK(); ?>

Tips: look for this line (below) and change your password configuration: “minLength, maxLenght, maxSymbol”. But, if you want your ‘password’ to generate equal – length, all you need to do is provide the same digits for these function: “maxLenght, maxSymbol”.

function GenPassCK($minLength = '16', $maxLength = '16', $maxSymbols = '6')

2.] Upload your PHP script and look for it on your server!

Example: “myserver.com/my-files.php”

“PHP programming is similar to maths, like DNA, like Einstein”

Copyrighted By Lair360

How To Implement ‘@font-face’ Attribute For Beginners

According to research from various designers and web developers, there is a great number of arguments regarding FONTS which are NOT supported by Windows & Mac OS. So, to achieve something different which is not pre-installed by the operating system, the user must integrate CSS and move away from ‘Web-safe fonts’. However, this may seem crazy for those who like to keep their website friendly for crawlers. But, to be truthful, it does make a BIG difference to your webpage and attract potential visitors!

Now here is a short tutorial for anyone who likes to give their webpage a little makeup. But, don’t forget to convert your chosen fonts for individual browser!

IE7+ (All Version) – EOT Format
Safari 3.2 & Above – TTF / OTF
Google Chrome (All Version) - SVG / TTF / OTF
FireFox 3.6 & Above – TTF / OTF
Opera 10 & Above – TTF / OTF

What You Need: Notepad Plus, GPL / Free Non-Commercial / Licensed Fonts (Which is purchased by YOU!)

1.] Convert your chosen fonts and drop them into your ‘project’ directory or root directory (hosting server). But, for those who would rather look online and convert it directly, please look into Google and find a service to convert it.

2.] Execute ‘Notepad Plus’ and copy these…

@font-face {
font-family: AGENCYB01;
src: url("EurostileLTStd-Bold.eot");
src: local("AGENCYB01"),
url("EurostileLTStd-Bold.otf"),
url("EurostileLTStd-Bold.ttf"),
url("EurostileLTStd-Bold.woff");
}

2.] Give your Fonts a different name. Look at my example if you don’t understand. See any difference?

@font-face {
font-family: AGENTSX;
src: url("EurostileLTStd-Bold.eot");
src: local("AGENTSX"),
url("EurostileLTStd-Bold.otf"),
url("EurostileLTStd-Bold.ttf"),
url("EurostileLTStd-Bold.woff");
}

If your webpage is located under another directory, such as one level deep, then take a look at this example. It’s not that complicated. Also, to keep everything simple, please don’t move your Fonts under another directory. Please keep them in your ‘root’ directory.

@font-face {
font-family: AGENTSX;
src: url("../EurostileLTStd-Bold.eot"),
src: local("AGENTSX"),
url("../EurostileLTStd-Bold.otf"),
url("../EurostileLTStd-Bold.ttf"),
url("../EurostileLTStd-Bold.woff");
}

For those who doesn’t support ‘Internet Explorer’, please use this alternate method. The only difference, it doesn’t have EOT format (Fonts).

@font-face {
font-family: AGENCYB01;
src: url("EurostileLTStd-Bold.otf");
src: local("AGENCYB01"),
url("EurostileLTStd-Bold.ttf"),
url("EurostileLTStd-Bold.woff");
}

Notes: from my point of view, ‘Internet Explorer’ is considered ‘Fussy, Troublesome & Resource Hogging’. I also NEVER use IE as my default browser. I only support FireFox, Chrome & Opera. They perform better and render my webpage, WAY BETTER!

How To Update ASRock Motherboard (DOS Mode)

For those who prefer updating their motherboard (using DOS method), then please read this article carefully! One little mistake could harm your motherboard and everything – that is your warning!

1.] Direct yourself to ASRock official website (Download Area), find your ‘Bios Revision’ and make sure it utilise DOS Mode!

2.] Download these application and reformat your USB devices as ‘FAT32’, then make it bootable: “Create a DOS startup disk” and point it to your ‘DOS System File’ directory. However, you must extract ‘win98Boot.zip’ first. After that, you may drop your Bios file (USB root directory) and rename it to your liking. But, you must keep it short and simple!

USB Reformat Tool: http://dl.dropbox.com/u/7667973/Windows_Repair/HP-USB-Disk-Storage-Format-Tool.zip

Win98Boot (Compressed File): http://dl.dropbox.com/u/7667973/Windows_Repair/win98boot.zip

Bios Rename Example: Z68P3G31.20.EXE >> ASRFLASH01.EXE (for easier reference)

3.] Leave your USB drive intact and reboot your system. After that, you must press ‘F2’ at POST (system boot) and set your USB drive to boot first – NOT YOUR Hard Drive!

4.] When you see a drive letter: “A:\” (Prompt), please type “ASRFLASH01.exe” (as an example) and hit “Enter”. But, don’t interfere when you see this message: “Please wait for BIOS loading ROM”.

5.] After the initial update, you will eventually see this message: “Program ended normally”.
When you are finish, reboot your system and press “F2”. This is required to ‘Load Default Settings’.

6.] Once set as ‘Default’, exit the Bios Setup Utility and continue normally.

How To Update ASUS Motherboard (BUPDATER)

For those who doesn’t know how to update their Bios outside ‘Windows’ environment, then take a look at this tutorial. However, please bear in mind that your motherboard MUST have ‘EZ Flash 2’ for this task. If you don’t have it, then please STOP reading and look for alternatives.

1.] Direct yourself to ASUS website (Homepage & Support) and download the correct ‘Bios Revision’ for your motherboard. Also, please don’t forget to download the latest ‘BUPDATER’ for this procedure.

UK Region: http://uk.asus.com/
US Region: http://usa.asus.com/

2.] Get yourself a USB flash drive and format it. However, the format must be set to ‘FAT32 / FAT16’ and nothing else!

Notes: if your motherboard doesn’t support ‘built-in DOS’, then take a look at this PAGE. It has “Win98Boot” files and USB Format Tools. But, the rest is for you to create a bootable DOS with a USB drive.

3.] Create a new folder: BIOS (All Capital) inside your formatted USB flash drive. After that, you must extract (unzip) your Bios file and drop them inside that folder. If the unzipped BIOS file was named like: ‘Maximus-IV-Extreme-Z-ASUS-0403.ROM’, then you will need to shorten it: ‘MAXV0403.ROM’ (8 Characters).

Notes: due to a limitation, the program (BUPDATER) can only recognize 8 character / digits. Therefore, please rename / shorten your file for the initial update.

4.] Leave your USB drive intact and reboot your system.

5.] Press ‘DEL’ during POST (Power-On-Self-Test) to enter ‘BIOS Setup’, then set everything to ‘Default – press F5’ (Keyboard Layout May Be Different). But, please don’t forget to set your USB devices to boot first – NOT your Hard Drive! If that is too hard for you, just press F8 (Boot Menu) to reboot.

Notes: if you are an overclocker / gamer, don’t be daft and brick your motherboard. Please set everything to default – it’s for the best!

6.] Save your Default settings and ‘Exit – F10’. (Reboot BIOS).

7.] When you are in ‘DOS Mode’, just type / copy / replace what I wrote below. However, your drive letters may be different…

o *Backup
i *Flash / Update

A:\>cd bios
A:\BIOS>dir
******

A:\BIOS>bupdater /o<name>.rom
******

A:\BIOS>dir
A:\BIOS>bupdater /i<bios_profile>.rom

8.] Exit and restore your BIOS to Default.

Alternative: if you don’t like to fiddle with DOS, then head straight to ‘BIOS setup’ and look for ‘EZ-Flash 2.’ This program is located within the bios ‘Tools’ section.

Copyrighted By Lair360

Give your system memory a good kick!

For those who has the URGE to upgrade their motherboard with a bucket of 16GB~24GB Memory, then be prepare to follow these guidelines if you have any problems with your system motherboard / memory. However, if you don’t know what you are doing, please STOP and consult your problems with a professional.

Now, just before starting, you will need to check your system for any ‘misreading’. For example, my motherboard has 24GB DDR3 Memory and it will only recognize ‘16 GB DDR3’ from the system. So, what is the initial basic? Check the system and allow BIOS & Hardware to recognize all available memory (on-board).

Notes: for your own safety and avoiding hardware failure (ESD), some of the procedure will require you to wear ‘Anti-Static Wrist Strap’. But, if you’re living within the UK, please consider buying a PSU that provides a switch (ON/OFF). After that, you must connect it with a 3 pin socket through the wall. However, please use a universal plug and snip the ‘Blue & Brown’ wiring. They are not required! Also, for better safety, please buy this: LINDY Anti-Static Service Kit. They will provide everything for you!

Brown – LIVE
Blue – NEUTRAL
Green/Yellow – EARTH

When you are using this procedure, please ensure that your PSU and Wall are switched off (if the wall has a switch). But, don’t worry about your components. Everything will be EARTH once you ground everything.

1.] When upgrading / applying more memory for your system, please clip them into place and firmly check for loose ends. If you don’t, then your bios / system will not recognize it. However, if these problems still persist, please consider looking at ‘Memtest86’ and analyze your memory for errors.

http://www.memtest.org/

From experience, you will need to check your motherboard and make sure it’s compatible with your system. But, if your DDR memories that is registered / qualified, then there shouldn’t be problems, for example: ‘system errors, bsod (Blue Screen Of Death), crashes and system instability.’

2.] Check your version of Windows XP & Windows 7. Most of you should know the basic just before building a PC or buying more memory for your system!

* = “24GB ~ 128 GB”

Windows 7 / XP Professional (32bit) – 4GB Max
Windows XP Professional (64bit) – 24GB*

Windows 7: Home Basic (x64) – 8GB
Windows 7: Home Premium (x64) – 16GB
Windows 7: Professional (x64) – 24GB*
Windows 7: Enterprise (x64) – 24GB*
Windows 7: Ultimate (x64) – 24GB*

3.] From your desktop (operating system), you will need to deselect “Maximum Memory.” This process can be done by going through: ‘Start >> Run >> Type: Msconfig >> BOOT.INI >> Advance Options. Nevertheless, if it isn’t being selected, you will have to check your Bios configuration. However, please be aware that your motherboard may not support ‘memory remapping’ feature.

Notes: modern motherboard, such as ASUS / MSI / Gigabyte will automatically allocate your memory and managed them at full capacity. But, for specific motherboard, such as ASUS, some of their models will require you to press a button, which is normally described as: ‘Memory OK.’

4.] For those who already have a fully – built system and willing to upgrade their ‘slots’ with another bucket of memory, then check your hardware ‘Bios’ revision. Most of the next generations: DDR3 Memory will require new updates / bios revision. But, to keep everything simple when it comes to update (dead easy for everyone), please consider buying ASUS motherboard only! Their qualities are robust and easy to maintain.

Notes: for beginners, PLEASE DOUBLE CHECK your motherboard’s Model / Serial Number! After that, just use EZ-Flash + USB Stick (Tools Provided by ASUS at Boot-up) and update your BIOS safely. However, please stay away from their ‘Windows Update’ procedure. It’s NOT safe to ‘Flash’ your bios directly from Windows! Although, if you don’t want to listen and perform this procedure, then bang yourself against the wall for being an idiot.

How To Flash Safely: ASUS Bios Update

Finally, here my 1st CLASS advice: don’t buy memories from a ‘second – hand’ user. Most of them will never EARTH their body / hands when touching their equipment / components. Therefore, you must always buy memories / parts from registered retailer or directly from a company (Registered Estore). This is because, if it turns out faulty, then you can always send it back for replacement (RMA). Also, here is something you should always ASK if you want to buy ‘second – hand’ equipment: ‘How do you earth yourself?’ If the seller didn’t answer this question correctly, then I would advise you to walk away and leave it.

Copyrighted By Lair360