Advertisement
choirurrizal

Auto Register WP-Add Admin V1

Feb 28th, 2018
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.06 KB | None | 0 0
  1. <?php
  2. $ch = curl_init();
  3. curl_setopt($ch, CURLOPT_URL, "http://lokal.rasikafm.co.id/wp-login.php?action=register");
  4. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  5. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  6. curl_setopt($ch, CURLOPT_POST, 1);
  7. curl_setopt($ch, CURLOPT_POSTFIELDS, array("user_login"=>"shinchan" , "user_email"=>"shinchan@localhost" , "pwd"=>"shinchan" , "wp-submit"=>"Register" , "redirect_to"=>""));
  8. $post = curl_exec($ch);
  9. //preg_match("/<p class=\"message\">(.*?)<br/",$post,$result);
  10. //$hasil = $result[0];
  11. //if(preg_match('/class="message">/',$post) OR preg_match("/Registration complete/",$post) OR preg_match("/Registrasi selesai/",$post)){
  12. //if(!preg_match("/<p class=\"message\">/",$post)){
  13. $ambila = explode("<p class=\"message\">",$post);
  14. $ambilb = explode("<br />",$ambila[1]);
  15. $result = str_replace(" ","",$ambilb[0]);
  16. $results = str_replace("  ","",$result);
  17. $resultz = str_replace("        ","",$results);
  18. echo $post."\n";
  19. echo $resultz;
  20. /*if($post){
  21.     echo "$post\n".$ambila[0]." OK";
  22. }else{
  23.     echo "$post\n".$ambila[0]." NO";
  24. }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement