created a nice (empty) function for the XOR
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
function xor_strings($str1, $str2, $str3) {
|
||||||
|
$result = shell_exec("python theXORitself.py -c1 $str1 -c2 $str2 -c3 $str3");
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "<html><body>";
|
echo "<html><body>";
|
||||||
echo '<form action="xor23.php" method="get">';
|
echo '<form action="xor23.php" method="get">';
|
||||||
echo 'component #1: <input type="text" name="comp1" size="64" maxlenght="64"><br>';
|
echo 'component #1: <input type="text" name="comp1" size="64" maxlenght="64"><br>';
|
||||||
@@ -11,6 +17,9 @@ echo"</form>";
|
|||||||
echo'<div class="messagebox">';
|
echo'<div class="messagebox">';
|
||||||
if ($_GET) {
|
if ($_GET) {
|
||||||
echo "Danny is een hele lieve man";
|
echo "Danny is een hele lieve man";
|
||||||
|
$xored = xor_strings($_GET['comp1'], $_GET['comp2'], $_GET['comp3']);
|
||||||
|
echo "<br><br>De XOR van de 3 componenten is: <br><b>$xored</b>";
|
||||||
|
|
||||||
}
|
}
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user