Don't like ads? PRO users don't see any ads ;-)
Guest

lolwhatevenenn

By: a guest on May 5th, 2012  |  syntax: None  |  size: 8.82 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. $counter = 100;
  3. $write = false;
  4. $filename = "hitcounter.txt";
  5. $ip = $_SERVER['REMOTE_ADDR'];
  6.  
  7. $file = fopen($filename, 'r');
  8.  
  9. $content = file_get_contents($filename);
  10. $file_content = explode(" ", $content);
  11.  
  12. fclose($file);
  13.  
  14. for ($i = 1; $i < count($file_content); $i++) {
  15.         if ($file_content[$i] != $ip) {
  16.                 $write = true;
  17.         } else {
  18.                 $write = false;
  19.                 break;
  20.         }
  21. }
  22.  
  23. $file = fopen($filename, 'w');
  24.  
  25. if ($write) {
  26.         fwrite($file, $content . " " . $ip . " -");
  27.        
  28.         $t = time()+61200;
  29. $timestamp =  date("H:i",$t);
  30.  
  31. if(!isset($_GET['t'])) {
  32.                 $txtlist = "newtext.txt.v2";
  33.                 $fh = fopen($txtlist, 'a') or die("can't open file");
  34.                 fwrite($fh,'<p>' . $_SERVER['REMOTE_ADDR'] . " Joined the Site at " . $timestamp . " </p>\n\n");
  35.                 fclose($fh);
  36. }
  37.        
  38. } else {
  39.         fwrite($file, $content);
  40. }
  41.  
  42. fclose($file);
  43.  
  44. $file = fopen($filename, 'r');
  45.  
  46. for ($i = 1; $i < count($file_content); $i++) {
  47.         if ($file_content[$i] == '-') {
  48.                 $counter++;
  49.         }
  50. }
  51.  
  52. fclose($file);
  53.  
  54.  
  55.   $file = "meow.txt";
  56.  
  57.   $lines = count(file($file));
  58.  
  59.  
  60.  
  61. ?>
  62.  
  63.  
  64.  
  65.  
  66. <html>
  67. <head>
  68. <title>SendWords</title>
  69.  <style type="text/css">
  70. .red {  background: #F00;}
  71.  
  72. .green {  background: #0F0; color: #FFF;}
  73.  
  74. .blue {  background: #00F;}
  75.  
  76. .yellow {  background: #FF0;}
  77.  
  78. .black { background: #000; }
  79.  
  80.   </style>
  81.  
  82.   <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  83.   <script src="speakWorker.js"></script>
  84.   <script src="speakClient.js"></script>
  85. <script>
  86. var msite;
  87.  
  88. if( navigator.userAgent.match(/Android/i)
  89.  || navigator.userAgent.match(/webOS/i)
  90.  || navigator.userAgent.match(/iPhone/i)
  91.  || navigator.userAgent.match(/iPad/i)
  92.  || navigator.userAgent.match(/iPod/i)
  93.  || navigator.userAgent.match(/BlackBerry/i)
  94.  || navigator.userAgent.match(/Windows Phone/i)
  95.  ){
  96.  msite = 1
  97. }
  98.  
  99.  
  100.  
  101. (function($) {
  102.     $.fn.textfill = function(options) {
  103.         var fontSize = options.maxFontPixels;
  104.         var ourText = $('span:visible:first', this);
  105.         var maxHeight = $(this).height();
  106.         var maxWidth = $(this).width();
  107.         var textHeight;
  108.         var textWidth;
  109.         do {
  110.             ourText.css('font-size', fontSize);
  111.             textHeight = ourText.height();
  112.             textWidth = ourText.width();
  113.             fontSize = fontSize - 1;
  114.         } while ((textHeight > maxHeight || textWidth > maxWidth) && fontSize > 3);
  115.         return this;
  116.     }
  117. })(jQuery);
  118.  
  119.  
  120.  
  121.  
  122. var state = 0;
  123.  
  124.  
  125. function getlink() {
  126.        
  127.         $.post("tgenlink.php", { text: $('input:eq(0)').attr('value'), amplitude: $('input:eq(1)').attr('value'), pitch: $('input:eq(2)').attr('value'), speed: $('input:eq(3)').attr('value'), workdgap: $('input:eq(4)').attr('value') }, function(data) {
  128.   var outputlink = 'http://sendwords.michaelzaporozhets.com/t.php?t=' + data;
  129.   $('span#link').html(outputlink)
  130.   $('#makecontainer').hide()
  131.   $('#homecontainer').hide()
  132.   $('#linkcontainer').hide()
  133.   $('#linkcontainer').toggle(200)
  134.         });
  135.        
  136.        
  137. }
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146. $().ready(function(){  
  147.     setInterval("checkAnchor()", 100);  
  148. });  
  149.  
  150.  
  151. var makepr = 0;
  152.  
  153. var currentAnchor = null;  
  154. //Function which chek if there are anchor changes, if there are, sends the ajax petition  
  155. function checkAnchor(){  
  156.  
  157.     //Check if it has changes  
  158.     if(currentAnchor != document.location.hash){  
  159.         currentAnchor = document.location.hash;  
  160.         //if there is not anchor, the loads the default section  
  161.         if(!currentAnchor)  {
  162.                 console.log('no anchor :c')
  163.                 }
  164.         else  
  165.         {  
  166.             //Creates the  string callback. This converts the url URL/#main&amp;amp;id=2 in URL/?section=main&amp;amp;id=2  
  167.             var splits = currentAnchor.substring(1).split('&amp;amp;');  
  168.             //Get the section  
  169.             var section = splits[0];  
  170.             delete splits[0];  
  171.             //Create the params string  
  172.             var params = splits.join('&amp;amp;');  
  173.             var query = section + params;  
  174.         }  
  175.                
  176.                 switch (query) {
  177.                 case 'make' :
  178.                 $('#makecontainer').hide()
  179.                 $('#homecontainer').hide()
  180.                 $('#makecontainer').toggle(200);
  181.         $('#linkcontainer').hide()     
  182.                 $('#makelink').addClass('activelink');
  183.                 makepr = 1
  184.                 if (makepr == 1) {
  185.                 $('.makech').show(200);
  186.                 }
  187.                 break;
  188.                 default:
  189.                 $('#homecontainer').hide()
  190.                 $('#homecontainer').toggle(200);
  191.                 $('#makecontainer').hide()
  192.         $('#linkcontainer').hide()
  193.                 $('#homelink').addClass('activelink'); 
  194.                 makepr = 0
  195.                 if (makepr == 0) {
  196.                 $('.makech').hide(200);
  197.                 }
  198.                 break;
  199.                
  200.                
  201.                 }
  202.                
  203.        
  204.                
  205.        
  206.     };
  207. };
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221. $(document).ready(function() {
  222.        
  223.        
  224.        
  225.         $('#makelink').click( function() {
  226.                 makepr = 1
  227.                 if (makepr == 1) {
  228.                 $('.makech').show(200);
  229.                 }
  230.                 });
  231.        
  232.        
  233.        
  234.         $('#homelink, #makelink, #linklink').click( function() {
  235.                 $('a').removeClass('activelink')
  236.                 $(this).addClass('activelink')
  237.                 });
  238.        
  239.         $('#linklink').click( function() {
  240.                
  241.                 getlink();
  242.                 makepr = 1
  243.                 });
  244.                 $('#makelink').click( function() {
  245.                        
  246.                        
  247.                         if($('#makecontainer').css('display') == 'none') {
  248.                         $('#makecontainer').hide()
  249.                 $('#homecontainer').hide()
  250.                 $('#makecontainer').toggle(200);
  251.         $('#linkcontainer').hide()     
  252.                                
  253.                         }
  254.                        
  255.                        
  256.                          });
  257.  
  258.        
  259.        
  260.         $('#play').click( function() {
  261.                
  262.                 speak( $('input:eq(0)').attr('value'), { amplitude:$('input:eq(1)').attr('value'), wordgap: $('input:eq(4)').attr('value'), pitch: $('input:eq(2)').attr('value'), speed: $('input:eq(3)').attr('value') }); return false
  263.                
  264.                 })
  265.        
  266.        
  267.         <?
  268. if (isset($_GET['t'])) {
  269.   $output = stripslashes(base64_decode($_GET['t']));
  270.   $pieces = explode("|", $output);
  271.   ?>
  272.  
  273.   $('input:eq(0)').attr('value', '<? echo $pieces[0];  ?>')
  274.   $('input:eq(1)').attr('value', '<? echo $pieces[1];  ?>')
  275.   $('input:eq(2)').attr('value', '<? echo $pieces[2];  ?>')
  276.   $('input:eq(3)').attr('value', '<? echo $pieces[3];  ?>')
  277.   $('input:eq(4)').attr('value', '<? echo $pieces[4];  ?>')
  278.   $('#makelink').click()
  279.   <?
  280.  
  281. }
  282. ?>
  283.        
  284.        
  285.  
  286.        
  287.         $('input[type="button"]').click( function() {
  288.                
  289.                 if(state == 0) {
  290.                 $('input[type="submit"] ').attr('value','Cause Seizures')
  291.                 $('input[type="button"]').attr('value','Strobe.')
  292.                 $('input[type="button"]').css({color: '#C00'})
  293.                 $('#lolhide').attr('value','1')
  294.                 state = 1
  295.                 }
  296.                 else if(state == 1)
  297.                 {
  298.                 $('input[type="submit"] ').attr('value','Cause Mind Rape')
  299.                 $('input[type="button"]').attr('value','Multistrobe!')
  300.                 $('input[type="button"]').css({color: 'lime'})
  301.                 $('#lolhide').attr('value','2')
  302.                 state = 2
  303.                 }
  304.                 else if(state == 2)
  305.                 {
  306.                 $('input[type="submit"] ').attr('value','Make Text')
  307.                 $('input[type="button"]').attr('value','Strobe? ')
  308.                 $('input[type="button"]').css({color: '#06F'})
  309.                 $('#lolhide').attr('value','')
  310.                 state = 0
  311.                 }
  312.                
  313.                
  314.                 })
  315.  
  316.        
  317. });
  318. setInterval(function() { $.get('ucount.php', function(data) { $('#counters').html(data); });} , 200)
  319.  
  320.  
  321.        
  322.         <? if(isset($_GET['s'])) { if ($_GET['s'] == 1) { echo "setInterval( function() { $('body').toggleClass('black') }, 100 ); "; }}  ?>
  323.        
  324. <? if(isset($_GET['s'])) { if ($_GET['s'] == 2) { ?>
  325. setInterval(function() { $('body').toggleClass('blue'); }, 200 )
  326. setInterval(function() { $('body').toggleClass('green'); }, 100 )
  327. setInterval(function() { $('body').toggleClass('yellow'); }, 50 )
  328.  
  329. <?
  330. }}
  331. ?>
  332.  
  333.  
  334.  
  335. </script>
  336. <link href="default.css" rel="stylesheet" type="text/css">
  337. </head>
  338. <body>
  339.  
  340.       <div id="head">
  341.     <a id="homelink" href="#home"><span>Home</span></a>
  342.     <a id="makelink" href="#make"><span>Make</span></a>
  343.      <a class="makech" id="play" href="#play"><span>Play</span></a>
  344.       <a id="linklink" class="makech" href="#make"><span>Link</span></a>
  345.       <a  class="makech" href="javascript:$('.theform').submit();"><span>Go -></span></a>
  346.     </div>
  347.    
  348.     <div id="maincontainer">
  349.    
  350.    
  351.      <div id="homecontainer">
  352.      
  353.      <h1>Send Words!</h1>
  354.      
  355.      </div>
  356.    
  357.     <div id="makecontainer">
  358. <form class="theform" action="tgen.php" method="post">
  359.     <label>Text: </label><input type="text" name="text" size=50 value="Never gonna give, you, up.">
  360.     <br/>
  361.      <label>Amplitude: </label><input type="text" name="amplitude" size=5 value="100">
  362.     <br/>
  363.      <label>Pitch: </label> <input type="text" name="pitch" size=5 value="50">
  364.     <br/>
  365.      <label>Speed: </label> <input type="text" name="speed" size=5 value="175">
  366.     <br/>
  367.      <label>Word gap:  </label><input type="text" name="workdgap" size=5 value="0">
  368.     <br/>
  369.     <input type="submit" style="display:none;" value="Go!">
  370.   </form>
  371.  
  372.   </div>
  373.  
  374.   <div id="linkcontainer">
  375.  
  376. <span id="linklabel"></span><span id="link"></span><span id="linkdesc"></span>
  377.  
  378. </div>
  379.  
  380.  
  381.  
  382.   </div>
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.    
  390.    <span id="footer">&copy; Michael Zaporozhets 2012, <span id="counters"></span></span>
  391.          
  392.  <div id="audio"></div>
  393.    
  394. </body>
  395. </html>