Hi
I am still receiving the same error---this is my code:
I have a simple form that posts the vars to my php page.
$file = $_FILES[file] [name];
$row = 1;
if (($handle = fopen("csv/$file", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
$row++;
for ($c=0; $c < $num; $c++) {
$msisdn = $data[$c];
echo $msisdn;
// call build url function
$slap_url = build_url($base_url, $username, $password, $text, $msisdn, $cost);
echo $slap_url;
// PHP Curl redirect
$url = 'http://gateway.networks.net/v2';
$params = "$slap_url";
$user_agent = "Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)";
$ch = curl_init();
curl_setopt($ch, CURLOPT_GET,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result=curl_exec ($ch);
curl_close ($ch);
}
}
fclose($handle);
}
When I upload the .csv file on to the webserver my script works, but not if i call the file from local HDD