Advertisement
Guest User

Untitled

a guest
Nov 27th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <?php
  2. declare(strict_types = 1);
  3. const USERNAME = '??';
  4. const PASSWORD = '??';
  5. const DOMAIN = '??';
  6. $ip = getGlobalIp ();
  7. require_once ('hhb_.inc.php');
  8. $hc = new hhb_curl ( '', true );
  9. $html = $hc->setopt_array ( array (
  10. CURLOPT_URL => 'https://api.freenom.com/v2/domain/modify',
  11. CURLOPT_POST => true,
  12. CURLOPT_CUSTOMREQUEST => 'PUT',
  13. CURLOPT_POSTFIELDS => http_build_query ( array (
  14. 'email' => USERNAME,
  15. 'password' => PASSWORD,
  16. 'domainname' => DOMAIN,
  17. 'forward_url' => $ip
  18. ) )
  19. ) )->exec ()->getStdOut ();
  20. var_dump ( $html );
  21. function getGlobalIp(): string {
  22. return file_get_contents ( 'https://api.ipify.org/?format=raw' );
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement