Skip to content

Instantly share code, notes, and snippets.

Avatar

Manzur Ahmed webtechriser

View GitHub Profile
View reset-wordpress-password-without-sql-manager-3.php
<?php
//Connect to mySQL First
$connection = mysql_connect( 'localhost', 'user_123', 'password_123' );
//Select Database
mysql_select_db( 'database_123' );
//Reset password with SQL UPDATE Query
$SQL="UPDATE wp_users SET user_pass = MD5('newPassword') WHERE user_login = 'admin'";
View reset-wordpress-password-without-sql-manager-2.php
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_123');
/** MySQL database username */
define('DB_USER', 'user_123');
/** MySQL database password */
define('DB_PASSWORD', 'password_123');
View reset-wordpress-password-without-sql-manager.php
<?php
// Connect to mySQL First
$connection = mysql_connect( 'DB_HOST', 'DB_USER', 'DB_PASSWORD' );
// Select Database
mysql_select_db( 'DB_NAME' );
// Reset password with SQL UPDATE Query
$SQL = "UPDATE wp_users SET user_pass = MD5( 'newpassword123here') WHERE user_login = 'admin'";
@webtechriser
webtechriser / how_to_use_public_ip_function.php
Created Feb 11, 2020
How to use public IP function in PHP
View how_to_use_public_ip_function.php
<?php if( clear_from_blocked_ips() ) : ?>
<script>
alert('This content is not blocked for your IP address');
</script>
<?php endif; ?>
View get_public_ip_address.php
<?php
/**
* Get Public IP Address
* Get the Public IP address of the client.
*
* @link http://stackoverflow.com/a/2031935/1743124
*
* @return string The IP Address.
*/
function get_public_ip_address(){
You can’t perform that action at this time.