Guest User

Untitled

a guest
Apr 20th, 2018
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. <?php
  2. $host = "178.33.82.55";
  3. $user = "sito";
  4. $pass = "sitopass";
  5. $db = "blog";
  6. $conn = mysql_connect($host,$user,$pass);
  7. mysql_select_db($db, $conn);
  8. $result = mysql_query("SELECT * FROM wp_posts WHERE post_type = 'post' ORDER BY id DESC LIMIT 10", $db);
  9. while ($records = mysql_fetch_assoc($result)) {
  10.     echo $records['post_title'];
  11. }
  12. ?>
Add Comment
Please, Sign In to add comment