Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #!/usr/bin/php -q
  2.  
  3. <?
  4. // require '/var/lib/asterisk/agi-bin/phpagi.php';
  5. // $agi = new AGI();
  6.  
  7. ob_start();
  8. $username="root";
  9. $password="xxxxxxx";
  10. $database="admessage";
  11. $host="localhost";
  12. mysql_connect($host,$username,$password);
  13. //# Select the database to use and error check
  14. @mysql_select_db($database) or die( "Unable to select database");
  15. $sql = "select* from message order by rand()";
  16. $query = mysql_query($sql);
  17. $data = mysql_fetch_array($query);
  18. mysql_close();
  19. //$agi->set_variable("admessage",$data['message']);
  20. ?>
  21. <?php echo $data['message'];?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement