if(preg_match('/^(!cpf) (.*)/s',$text)){
$exr=explode(" ",$text);
$get = file_get_contents('https://randomuser.me/api/1.2/?nat='.$exr[1]);
preg_match_all("(\"first\":\"(.*)\")siU", $get, $matches1);
$name = $matches1[1][0]; preg_match_all("(\"last\":\"(.*)\")siU", $get, $matches1);
$last = $matches1[1][0]; preg_match_all("(\"email\":\"(.*)\")siU", $get, $matches1);
$email = $matches1[1][0]; preg_match_all("(\"street\":\"(.*)\")siU", $get, $matches1);
$street = $matches1[1][0]; preg_match_all("(\"city\":\"(.*)\")siU", $get, $matches1);
$city = $matches1[1][0]; preg_match_all("(\"state\":\"(.*)\")siU", $get, $matches1);
$state = $matches1[1][0]; preg_match_all("(\"phone\":\"(.*)\")siU", $get, $matches1);
$phone = $matches1[1][0]; preg_match_all("(\"postcode\":(.*),\")siU", $get, $matches1);
$postcode = $matches1[1][0];
bot('sendmessage',[
'chat_id'=>$chat_id,
'text'=>"F_name: ".$name."
L_name: ".$last."
email: ".$email."
street: ".$street."
city: ".$city."
state: ".$state."
phone: ".$phone."
postcode: ".$postcode."
/\/\/\/\/\/\/\/\/\/\/\/\/\
DEV: @LAGANTY",
'disable_web_page_preview'=>true,
'parse_mode'=>"markdown",
'reply_to_message_id'=>$message->message_id,
]);
}
كود !cpf مال موقع chknet 🖤.
مثال: !cpf us
- @laganty
$exr=explode(" ",$text);
$get = file_get_contents('https://randomuser.me/api/1.2/?nat='.$exr[1]);
preg_match_all("(\"first\":\"(.*)\")siU", $get, $matches1);
$name = $matches1[1][0]; preg_match_all("(\"last\":\"(.*)\")siU", $get, $matches1);
$last = $matches1[1][0]; preg_match_all("(\"email\":\"(.*)\")siU", $get, $matches1);
$email = $matches1[1][0]; preg_match_all("(\"street\":\"(.*)\")siU", $get, $matches1);
$street = $matches1[1][0]; preg_match_all("(\"city\":\"(.*)\")siU", $get, $matches1);
$city = $matches1[1][0]; preg_match_all("(\"state\":\"(.*)\")siU", $get, $matches1);
$state = $matches1[1][0]; preg_match_all("(\"phone\":\"(.*)\")siU", $get, $matches1);
$phone = $matches1[1][0]; preg_match_all("(\"postcode\":(.*),\")siU", $get, $matches1);
$postcode = $matches1[1][0];
bot('sendmessage',[
'chat_id'=>$chat_id,
'text'=>"F_name: ".$name."
L_name: ".$last."
email: ".$email."
street: ".$street."
city: ".$city."
state: ".$state."
phone: ".$phone."
postcode: ".$postcode."
/\/\/\/\/\/\/\/\/\/\/\/\/\
DEV: @LAGANTY",
'disable_web_page_preview'=>true,
'parse_mode'=>"markdown",
'reply_to_message_id'=>$message->message_id,
]);
}
كود !cpf مال موقع chknet 🖤.
مثال: !cpf us
- @laganty