PHP Classes
Icontem

File: starpage.htm


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andrey Nikishaev  >  Little PHP Proxy  >  starpage.htm  
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
 

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>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products