Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i problem help me #18

Open
fullsharez opened this issue May 22, 2018 · 1 comment
Open

i problem help me #18

fullsharez opened this issue May 22, 2018 · 1 comment

Comments

@fullsharez
Copy link

Array
(
[0] => stdClass Object
(
[code] => 6003
[message] => Invalid request headers
[error_chain] => Array
(
[0] => stdClass Object
(
[code] => 6103
[message] => Invalid format for X-Auth-Key header
)

            )

    )

)

@fullsharez
Copy link
Author

I do not know how I did it but it works again so I noticed an error on your code here is what I added

if ($data->success) {
// Extract the record ID (if it exists) for the subdomain we want to update.
$rec_exists = false; // Assume that the record doesn't exist.
if (!empty($data->result)) {
$rec_exists = true; // If this runs, it means that the record exists.
$id = $data->result[0]->id;
$cfIP = $data->result[0]->content; // The IP Cloudflare has for the subdomain.
$proxied = $data->result[0]->proxied; // The IP Cloudflare has for the subdomain.

}

look for proxied $proxied = $data->result[0]->proxied;

//and
} elseif ($ip != $cfIP) {
// Build the request to update the DNS record with our new IP.
// https://api.cloudflare.com/#dns-records-for-a-zone-update-dns-record
$fields = array(
'name' => $ddnsAddress,
'type' => $type,
'content' => $ip,
'proxied' => $proxied
);

because your code has problems it disable the proxy voila thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant