PHP Classes

File: starpage.htm

Recommend this page to a friend!
  Classes of Andrey Nikishaev   Little PHP Proxy   starpage.htm   Download  
File: starpage.htm
Role: Example script
Content type: text/plain
Description: starpage for proxy with base64 autoencoding of entered URL
Class: Little PHP Proxy
Show remote pages as if they from the current site
Author: By
Last change: little fix
Date: 16 years ago
Size: 1,704 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title>Little Php Proxy</title>
        <style type="text/css">
body {
margin:0;
padding:0;
background: #E5E5E5;
font-face:Arial Black;
font-size:10pt;
color:#000000;
}
div#form {
text-align:center;
width:100%;
font-size:100%;
}
input, textarea {
border:#999999 1px solid;
}
</style>
    </head>
    <body spellcheck="false">
        <div id="form">
        <form method="post" name="go" action="examlpe.php">
            URL:<br/><input type="text" size="132" name="u" /><br />
            Cookie:<br/><input type="text" size="132" name="c" /><br />
            <br />
            <input type="button" onclick="dogo()" value=" Go " />
        </form>
        <script type="text/javascript">
function doit(){
  var cipherText = btoa(document.b64.clear.value);
  document.b64.cipher.value = cipherText;
}

function dogo(){
  var cipherText = btoa(document.go.u.value);
  document.go.u.value = cipherText;
  document.go.submit();
}

function undoit(){
  var clearText = atob(document.b64.cipher.value);
  document.b64.clear.value = clearText;
}
 </script>
        <form name="b64">
            <p>Clear Text:<br />
            <textarea rows="3" cols="100" name="clear"></textarea></p>
            <p>Base64 Encoded Text:<br />
            <textarea rows="3" cols="100" name="cipher"></textarea></p>
            <p><input type="button" value="Encode" onclick="doit()" name="encodeit" /> <input type="button" value="Decode" onclick="undoit()" name="decodeit" /> <input type="reset" value="Clear Form" /></p>
        </form>
        </div>
     </body>
</html>