Cara membuat base64 encoder & decoder Dengan Php
Heyoooo guys pada kesempatan yang sangat baik ini mimin bakal kasih tau cara membuat base64 Encoder & Decoder Dengan Php, apasih base64? apasih encoder & decoder?? kalian yang masih awam pasti bertanya tanya ... ok mimin jelasin dulu dari apa itu base64, base 64 itu merupakan sistem penyandian suatu data binner ke dalam bentuk teks, Base64 itu terdiri dari 64 karakter dari a-z, A-Z, 0-9 dan dua karakter lagi yang biasa digunakan adalah + dan /. nah setelah kalian mengerti apa itu base64 sekarang mimin jelasin apa itu encoder & decoder, Encoder adalah sebuah alat yang digunakan untuk mengkonversi data ke dalam format tertentu, sedangkan Decoder adalah kebalikannya yaitu alat yang digunakan untuk mengembalikan suatu proses encoding sehingga kita dapat melihat data yang asli.
kalian pengen bisa buat encoder & decoder sendiri? langsung saja simak ea :v
- buat sintax form untuk encoder, silahkan di copas
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Base64 Encoder</title>
<style type="text/css">
<!--
body,td,th {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #00FF00;
font-weight: bold;
}
body {
background-color: #000000;
}
a:link {
color: #FF0000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #00FF00;
}
a:hover {
text-decoration: none;
color: #99FFFF;
}
a:active {
text-decoration: none;
color: #9900FF;
}
.style3 {
color: #00FF00
}
a {
font-weight: bold;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></head>
<body>
<style type='text/css'>
body {
background-color: #000000;
color: green;
font-family:courier new;
font-size:12px;
}
text,input,table,tr,td,th {
border-color: green;
border-style: solid;
border-width: 1px;
color: green;
background:#0f0f0f;
font-family:courier new;
font-size:12px;
}
</style>
<center><br>
Base64 Decoder/Encoder Coded by r00tXploiter @manasaiatahu.tech <br>
<br>
<form action="encrypt.php" method="POST">
<input type="text" name="data">
<input type="submit">
</form>
</center>
</form>
</body>
</html>
- selanjutnya copas sintax proses encode nya
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Base64 Encoder</title>
<style type="text/css">
<!--
body,td,th {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #00FF00;
font-weight: bold;
}
body {
background-color: #000000;
}
a:link {
color: #FF0000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #00FF00;
}
a:hover {
text-decoration: none;
color: #99FFFF;
}
a:active {
text-decoration: none;
color: #9900FF;
}
.style3 {
color: #00FF00
}
a {
font-weight: bold;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></head>
<body>
<style type='text/css'>
body {
background-color: #000000;
color: green;
font-family:courier new;
font-size:12px;
}
text,input,table,tr,td,th {
border-color: green;
border-style: solid;
border-width: 1px;
color: green;
background:#0f0f0f;
font-family:courier new;
font-size:12px;
}
</style>
<center><br>
Base64 Decoder/Encoder Coded by r00tXploiter @manasaiatahu.tech <br>
<br>
<h1>
<?php
$encrypt =$_POST['data'];
$data=base64_encode($encrypt);
echo "Result : ".$data;
?>
</h1>
</form>
</center>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Base64 Decoder</title>
<style type="text/css">
<!--
body,td,th {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #00FF00;
font-weight: bold;
}
body {
background-color: #000000;
}
a:link {
color: #FF0000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #00FF00;
}
a:hover {
text-decoration: none;
color: #99FFFF;
}
a:active {
text-decoration: none;
color: #9900FF;
}
.style3 {
color: #00FF00
}
a {
font-weight: bold;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></head>
<body>
<style type='text/css'>
body {
background-color: #000000;
color: green;
font-family:courier new;
font-size:12px;
}
text,input,table,tr,td,th {
border-color: green;
border-style: solid;
border-width: 1px;
color: green;
background:#0f0f0f;
font-family:courier new;
font-size:12px;
}
</style>
<center><br>
Base64 Decoder/Encoder Coded by r00tXploiter @manasaiatahu.tech <br>
<br>
<form action="decrypt.php" method="POST">
<input type="text" name="data">
<input type="submit">
</form>
</center>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">Gampang kan :v tinggal copas apa susahnya :''v, sekarang kita tes :D
<html>
<head>
<title>Base64 Decoder</title>
<style type="text/css">
<!--
body,td,th {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #00FF00;
font-weight: bold;
}
body {
background-color: #000000;
}
a:link {
color: #FF0000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #00FF00;
}
a:hover {
text-decoration: none;
color: #99FFFF;
}
a:active {
text-decoration: none;
color: #9900FF;
}
.style3 {
color: #00FF00
}
a {
font-weight: bold;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></head>
<body>
<style type='text/css'>
body {
background-color: #000000;
color: green;
font-family:courier new;
font-size:12px;
}
text,input,table,tr,td,th {
border-color: green;
border-style: solid;
border-width: 1px;
color: green;
background:#0f0f0f;
font-family:courier new;
font-size:12px;
}
</style>
<center><br>
Base64 Decoder/Encoder Coded by r00tXploiter @manasaiatahu.tech <br>
<br>
<h1>
<?php
$decrypt =$_POST['data'];
$data=base64_decode($decrypt);
echo "Result : ".$data;
?>
</h1>
</form>
</center>
</form>
</body>
</html>
- Disini mimin mau ngubah teks "r00txploiter disini" kedalam bentuk base64
- dan ini hasilnya hwhw :D
- Coba mimin balikin base64 itu ke dalam bentuk teks apakah hasilnya sama ?
- Dan ini hasilnya .....
Okeeehhh cukup sekian tutorial kali ini semoga bemanfaat untuk kita semua, teruslah berkarya dan tetap merendah :D see you next time ^^
Open Comments
Close Comments
1 komentar untuk "Cara membuat base64 encoder & decoder Dengan Php"