We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 450b360 commit 62373f9Copy full SHA for 62373f9
1 file changed
cloudflare.php
@@ -27,7 +27,7 @@ function __construct($argv)
27
28
$this->apiKey = (string) $argv[2]; // CF Global API Key
29
$hostname = (string) $argv[3]; // example: example.com.uk---sundomain.example1.com---example2.com
30
- $this->ip = (string) $argv[4];
+ $this->ip = (string) $this->getIpAddressIpify();
31
32
$this->validateIp($this->ip);
33
@@ -92,6 +92,12 @@ function validateIp($ip)
92
}
93
return true;
94
95
+ /*
96
+ * get ip from ipify.org
97
+ */
98
+ function getIpAddressIpify() {
99
+ return file_get_contents('https://api64.ipify.org');
100
+ }
101
102
/*
103
* IPv4 = zone A, IPv6 = zone AAAA
0 commit comments