Welcome Guest, Not a member yet? Register   Sign In
CURL error: The requested URL returned error: 403
#1

It's my code to send curl:

PHP Code:
$data = array(
    "foo" => "bar"
);

$curl_options = array(
    'query' => $data,
    'timeout' => 1,
    "user_agent" => "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
);

$client = \Config\Services::curlrequest();

$client->request('PUT'"https://myownsite.com/index.php/receive_curl/receive"$curl_options); 

It's giving this error:


Quote:22 : The requested URL returned error: 403


Did I missed any required option in my code?
Reply
Reply




Theme © iAndrew 2016 - Forum software by © MyBB