Skip to content

Instantly share code, notes, and snippets.

@hakkikonu
Last active May 23, 2018 15:28
Show Gist options
  • Save hakkikonu/b3ce356f180e6b6e26cfbb250c042fbb to your computer and use it in GitHub Desktop.
Save hakkikonu/b3ce356f180e6b6e26cfbb250c042fbb to your computer and use it in GitHub Desktop.
lm
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "http://www.lastikmarka.com/services/jquery/Product.ashx?CatId=2413",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_VERBOSE => true,
CURLOPT_HTTPHEADER => array(
"Accept: application/json",
"Cache-Control: no-cache",
"Postman-Token: db0465cf-dc6c-4813-ae2f-826701889031",
"Referer: http://www.lastikmarka.com/kategori/atv-lastikleri.aspx",
"X-Requested-With: XMLHttpRequest",
"Cookie: ASP.NET_SessionId=auhvqhq1tlbwo5zwp2mhdoqw"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
$responseArray = json_decode($response,TRUE);
print_r($responseArray);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment