Advertisement
luuksweb

Fatal error

Feb 9th, 2013
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.11 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. $host="***";
  5. $username="***";
  6. $password="***";
  7. $db_name="***";
  8. $tbl_name="***";
  9.  
  10. mysql_connect("$host", "$username", "$password")or die("cannot connect");
  11. mysql_select_db("$db_name")or die("cannot select DB");
  12.  
  13. //header("location:***.php");
  14. if($_SESSION['***'] == '***'){
  15. $fp = fopen("***.html", 'w');
  16. fwrite($fp, "");
  17. fwrite($fp, '<p class="green">*** is online</p>');
  18.  
  19.  
  20.  
  21. $result = mysql_query("select count(1) FROM ***");
  22. $row = mysql_fetch_array($result);
  23.  
  24. $rows = $row[0]+1000;
  25.  
  26. echo "Rows: ".$rows."\n";
  27.  
  28. for ($id = 1000; $id < $rows; $id++) {
  29.  
  30. echo "ID: ".$id."\n";
  31.  
  32. function genereerLiveCodeP () {
  33.     $lengthCode = 6;
  34.     $characters = '1234567890abcdefghijklmnopqrstuvwxyz';
  35.     $liveCodeFunction = '';
  36.    
  37.     for ($p = 0; $p < $lengthCode; $p++) {
  38.         $liveCodeFunction .= $characters[mt_rand(0, strlen($characters))];
  39.     }
  40.    
  41.     return $liveCodeFunction;
  42. }
  43.  
  44. $livecode = genereerLiveCodeP ();
  45.  
  46. echo "Livecode: ".$livecode."\n";
  47.  
  48. $*** = mysql_query("UPDATE *** SET livecode='".$livecode."' WHERE *** = '".$***."'");
  49.  
  50. echo "***: ".$***."\n";
  51.  
  52. }
  53.  
  54.  
  55.  
  56. }
  57. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement