Advertisement
niammuddin

Acak tanggal wordpress

Mar 16th, 2018
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <?php
  2. @include 'cfg.php';
  3.  
  4. function patch_tables($host,$user,$pass,$name) {
  5. $db = mysql_connect($host,$user,$pass);mysql_select_db($name,$db);
  6. mysql_query("UPDATE wp_posts SET post_date = DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP('2017-03-01') + FLOOR(0 + (RAND() * 63072000))), '%Y-%m-%d')");
  7. mysql_query("UPDATE wp_posts SET post_date_gmt = DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP('2017-03-01') + FLOOR(0 + (RAND() * 63072000))), '%Y-%m-%d')");
  8. mysql_query("UPDATE wp_posts SET post_modified = DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP('2017-03-01') + FLOOR(0 + (RAND() * 63072000))), '%Y-%m-%d')");
  9. mysql_query("UPDATE wp_posts SET post_modified_gmt = DATE_FORMAT(FROM_UNIXTIME(UNIX_TIMESTAMP('2017-03-01') + FLOOR(0 + (RAND() * 63072000))), '%Y-%m-%d')");
  10. mysql_close($db);
  11. }
  12.  
  13. patch_tables(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement