serialize.php
998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
if(array_key_exists('not_serialize', $_POST)) {
$serialize_s = serialize($_POST['not_serialize']);
$not_serialize_s = $_POST['not_serialize'];
} else {
$serialize_s = $not_serialize_s= '';
}
if(array_key_exists('serialize', $_POST)) {
$serialize_us = unserialize($_POST['serialize']);
$not_serialize_us = $_POST['serialize'];
} else {
$serialize_us = $not_serialize_us= '';
}
?>
<html>
<head><title></title></head>
<body>
<form action="serialize.php" method="post">
<h2>Klartext serilisieren</h2>
<p><textarea name="not_serialize" cols="50" rows="10"><?php echo $not_serialize_s ?></textarea></p>
<p><?php echo $serialize_s ?></p>
<h2>serilisierte Text zu Klartext</h2>
<p><textarea name="serialize" cols="50" rows="10"><?php echo $not_serialize_us ?></textarea></p>
<p><pre><?php echo print_r($serialize_us, true) ?></pre></p>
<input type="submit" value=" Absenden ">
<input type="reset" value=" Abbrechen">
</form>
</body>
</html>