<script>
console.log(navigator.language);
    var locale = window.location.href
    if (locale.indexOf('?') == -1){
window.location = 'test.php?language=' + navigator.language;
    }
</script>
<?php
echo mt_rand(1,99999);
?>

<!--

Numbers
MY FAVS
is_int 
is_numeric 
min
max
ceil
round
floor


number_format
money_format
rand vs mt_rand vs random_int



Strings
nl2br  <!--exercise-->
<?php
$content =  strip_tags(nl2br($_POST['facebookpost']),'<br><div><b><i>');

$swears = ['darn','geez','schucks'];
$clean = str_ireplace($swears,'*&^*!',$content);
echo $clean;
$password = 'admin';
echo base64_decode(base64_encode($password));


              

?>

<script type="text/javascript" src="./nicEdit.js"></script>
<script type="text/javascript">
	bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>

<form action="test.php?<?php echo $_SERVER['QUERY_STRING'];?>" method="post">
<textarea name="facebookpost"></textarea>
<input type="submit" name="submit" value="Break Me">
</form>


<!--
htmlspecialchars
htmlentities
strip_tags(); 
addslashes
stripslashes

mcrypt_encrypt
mcrypt_decrypt

url_encode
url_decode
crypt
mcrypt_encrypt
mcrypt_decrypt  <---exercise
strpos & stripos
substr
strlen
str_word_count
uc_first
uc_words
strtoupper
strtolower
str_replace
str_ireplace  <!--swear filter exercise 
trim -->

