Advertisement
Terrah

super_gg_script.php

Jan 24th, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1.     $db = mysqli_connect("localhost","terrahexp","","terrahexp");
  2.     $sql = "SELECT * FROM pics ORDER BY `Random` LIMIT 1;";
  3.     $sth = $db->query($sql);
  4.     $result=mysqli_fetch_array($sth);
  5.     echo "<!DOCTYPE html>";
  6.     echo "<head>";
  7.     echo "<title>".$result['ID']."</title>";
  8.     echo "</head>";
  9.     echo "<html>";
  10.     echo '<link rel="icon" href="icon1.ico" type="image/x-icon"/>';
  11.     echo '<link rel="shortcut icon" href="icon1.ico" type="image/x-icon"/>';
  12.     echo "<body>";
  13.     echo '<img src="data:image/jpeg;base64,'.base64_encode( $result['Data'] ).'"/>';
  14.     echo "</body>";
  15.     echo "</html>";
  16.    
  17.     $sql = "UPDATE pics SET `Random`=RAND()*1000 WHERE `ID`='".$result['ID']."';";
  18.     $sth = $db->query($sql);
  19.    
  20.     die();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement