Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "http://lokal.rasikafm.co.id/wp-login.php?action=register");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, array("user_login"=>"shinchan" , "user_email"=>"shinchan@localhost" , "pwd"=>"shinchan" , "wp-submit"=>"Register" , "redirect_to"=>""));
- $post = curl_exec($ch);
- //preg_match("/<p class=\"message\">(.*?)<br/",$post,$result);
- //$hasil = $result[0];
- //if(preg_match('/class="message">/',$post) OR preg_match("/Registration complete/",$post) OR preg_match("/Registrasi selesai/",$post)){
- //if(!preg_match("/<p class=\"message\">/",$post)){
- $ambila = explode("<p class=\"message\">",$post);
- $ambilb = explode("<br />",$ambila[1]);
- $result = str_replace(" ","",$ambilb[0]);
- $results = str_replace(" ","",$result);
- $resultz = str_replace(" ","",$results);
- echo $post."\n";
- echo $resultz;
- /*if($post){
- echo "$post\n".$ambila[0]." OK";
- }else{
- echo "$post\n".$ambila[0]." NO";
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement