Created
February 5, 2018 21:16
-
-
Save lsferreira42/56fb2484dfaa2388c457168d2af24afd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//API KEY | |
$new_api_key = 'NOVACHAVEDEAPI'; | |
//Pega as variaveis necessarias e testa a conexao | |
include_once "wp-config.php"; | |
$link = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); | |
if (!$link) { | |
die('cant connect to the database!'); | |
} | |
echo 'connected!'; | |
$sql_update_key = 'UPDATE wp_options set option_value = "' . $new_api_key . '" where option_name = "gocache_option-api_key";'; | |
$result = mysqli_query($link, $sql_update_key); | |
mysqli_close($link); | |
echo 'updated!' | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment