For while I'm using file_get_contents, but idk why am I getting always error. i heard that cURL will not get that error.
Here is my code that i want to convert to cURL
<?php
$details1=json_decode(file_get_contents("http://2strok.com/download/download.json"));
$details2=json_decode(file_get_contents($details1->data));
header("Location: ".$details2->data); ?>
Nothing is wrong with this code on localhost, but when I do it on my web server (hosted by one.com) it doesn't work. It shows this error:
Warning: file_get_contents(url): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized