Advertisement
t3ll0

new_wp-config.php

Jun 20th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.80 KB | None | 0 0
  1.                                                     <?php
  2. require_once("curl.php");
  3. require_once("jwt_helper.php");
  4. $mem = new Memcached();
  5. $mem->addServer("127.0.0.1", 11211);
  6. $result = $mem->get("token");
  7. $username="";
  8. $password="";
  9. $dbname="";
  10. $key="liviaWp"
  11. if ($result) {
  12. try {
  13. $data=JWT::decode($result, $key,dirname(__FILE__));
  14. $dbname= $data->dbname;
  15. $username= $data->username;;
  16. $password= $data->password;
  17. } catch (Exception $e) {
  18. print_r($e);
  19. exit();
  20. }
  21. } else {
  22. $appId=11;
  23. $cx = new Curl;
  24. $cek = $cx->simple_get("http://172.17.0.4/db2/rest/token/".$appId."/".$key);
  25. $res = json_decode($cek, true);
  26. if($res["error"]){
  27. exit();
  28.  }else{
  29. $token= $res["token"];
  30. $mem->set("token",$token) or die("Couldnt save token to memcached...");
  31. try {
  32. $data=JWT::decode($token, $key,dirname(__FILE__));
  33. $dbname= $data->dbname;
  34. $username= $data->username;
  35. $password= $data->password;
  36.  } catch (Exception $e) {
  37. print_r($e)
  38. exit();
  39. }
  40. }
  41. }
  42. define("DB_NAME", $dbname);;
  43. define("DB_USER",$username);
  44. define("DB_PASSWORD", $password);
  45. define("DB_HOST", "172.17.0.2:3306");
  46. define("DB_CHARSET", "utf8mb4");
  47. define("DB_COLLATE", "");
  48. define('AUTH_KEY',         ']PZqS5>dkqgQ+-_C{EPPE>_Pw!.M`@f1Fa{=b}y1,q3+d./d2*>[}Nv.O>0Knm%T');
  49. define('SECURE_AUTH_KEY',  'PRA+c~gvd|E$e= p74Hsh& c!V;t-e_wlY0s3pM(hb-xyZR^`}4_cbNm0wT;r.=e');
  50. define('LOGGED_IN_KEY',    'zh;<B{;|t/d.toPRMje.],h#A6;3p7}D.YmMI-md!/wty$m99afn;b4AlAVp(J3 ');
  51. define('NONCE_KEY',        '%q{tZ6|@OK(y/tp <jo&+4?M~Y(gD?/!$Ok(3jun:7yD/&|=>c=s7cqBX!!eZ i^');
  52. define('AUTH_SALT',        '2!#vq&@zK|T&d?3SDYeXyf,]?%(1i~%!tIX[Qz4wM+ks Y}`#)NOFssn7!.S:TEJ');
  53. define('SECURE_AUTH_SALT', 'LTYE$5u=~]~I_64hY]B*2A9]Rc6>HY7x|-4#I(-:FYUG)+z%#0g`BYHgnT7SBaK}');
  54. define('LOGGED_IN_SALT',   'K;hPkyc6;(+V[Ods8x4]+:t;mK{_lF?}lynV-Xi QQ@CmmKi[LEa>>ThkQO3((}C');
  55. define('NONCE_SALT',       ':;41DVgFn2Z:*]#_-?j<`y4pK0j=-26TxOw{hnRBD*trrotRlR`_O~>X3iMd.K(F');
  56.  
  57. /**#@-*/
  58.  
  59. /**
  60.  * WordPress Database Table prefix.
  61.  *
  62.  * You can have multiple installations in one database if you give each
  63.  * a unique prefix. Only numbers, letters, and underscores please!
  64.  */
  65. $table_prefix  = 'wp_';
  66.  
  67. /**
  68.  * For developers: WordPress debugging mode.
  69.  *
  70.  * Change this to true to enable the display of notices during development.
  71.  * It is strongly recommended that plugin and theme developers use WP_DEBUG
  72.  * in their development environments.
  73.  *
  74.  * For information on other constants that can be used for debugging,
  75.  * visit the Codex.
  76.  *
  77.  * @link https://codex.wordpress.org/Debugging_in_WordPress
  78.  */
  79. define('WP_DEBUG', false);
  80.  
  81. /* That's all, stop editing! Happy blogging. */
  82.  
  83. /** Absolute path to the WordPress directory. */
  84. if ( !defined('ABSPATH') )
  85.     define('ABSPATH', dirname(__FILE__) . '/');
  86.  
  87. /** Sets up WordPress vars and included files. */
  88. require_once(ABSPATH . 'wp-settings.php');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement