Zelim pomocu curl-a da preuzmem stranu:
http://www.nbs.yu/internet/lat...07&vrsta=1&eksport=xml
sa ovim kodom:
<?php
$datum = '01.01.2007';
$vrsta = '1';
$eksport = 'xml';
$bcURL = 'http://www.nbs.yu/internet/latinica/scripts/kl.html';
$data = "datum=".urlencode($datum)."&vrsta=".urlencode($vrsta)."&eksport=".urlencode($eksport);
$cUrl = curl_init();
curl_setopt($cUrl, CURLOPT_URL, $bcURL);
curl_setopt($cUrl, CURLOPT_HEADER, 'Content-type: application/x-www-form-urlencoded');
curl_setopt($cUrl, CURLOPT_GET, 1);
curl_setopt($cUrl, CURLOPT_GETFIELDS, $data);
curl_setopt($cUrl, CURLOPT_TIMEOUT, 30);
$response = curl_exec($cUrl);
if (curl_errno($cUrl)) {
print curl_error($cUrl);
} else {
print $response;
}
?>
ali stalno dobijam 404 stranu.












curl problem sa sajtom NBS