The 100$ Laptop
Dec
27
Dec
27
Remove invalid characters from a filename
<?php
function filename_safe($filename) {
$temp = $filename;
// Lower case
$temp = strtolower($temp);
// Replace spaces with a '_'
$temp = str_replace(" ", "_", $temp);
// Loop through string
$result = '';
for ($i=0; $i<strlen($temp); $i++) {
if (preg_match('([0-9]|[a-z]|_)', $temp[$i])) {
$result = $result . $temp[$i];
}
}
// Return filename
return $result;
}
?>
Dec
26
Heat levels in NFS Most Wanted
There are five heat levels in the game (with a hidden sixth and seventh heat level at the end of Career mode and in the Black Edition respectively), three authoritative levels (Civic/Local, State, and Federal Cops), and 10 kindsa police vehicles. You start off Campaign mode only with Heat levels 1 and 2 (City/Local Police)
By defeating Blacklist Rivals, you can then achieve higher heat levels:

- Heat level 3 (State Police): Defeat the Blacklist Rival #13.
- Heat level 4 (Undercover State Troopers): Defeat the Blacklist Rival #9.
- Heat level 5 (Federal Authorities): Defeat the Blacklist Rival #5.
- Heat level 6 (Cross Street Racing Unit): Defeat the Blacklist Rival #1 (final level).
After you beat the Rockport’s Most Wanted level, Heat level 5 will then consist of both the Federal Authorities and Cross Street Racing Units.

