Curl error does not follow request

0

I'm creating a donation field from my site that is interconnected remotely with another but I'm having problems with redirection, post post dates to the page: > and what should happen is to follow the request until the content of the page link more for some error is returning error code 404 not found my code looks correct but does not work as it should work

<?php

$ch = curl_init();
$url = "https://www.kickante.com.br/campanhas/pastor-de-ovelhas/apoiar";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "amount=100%2C00&op=Quero+contribuir%21&form_build_id=form-PNMhiIetNqWfqwL6oc1EtvA_5sG3-J3KEErIg_5Y30o");
$result = curl_exec($ch);
curl_close($ch);
unset($ch);

?>
    
asked by anonymous 29.07.2017 / 11:34

0 answers