Wednesday, 21 August 2013

Reading protected CSV file

Reading protected CSV file

I want PHP program to read csv file. I am done with simple CSV file
reading by getting URL and passing appropriate variables into that URL.
But in my project to open CSV file login is required. How Can I do it with
PHP program. I want to logged in by program and read that csv file. Later
on I will implement it in zend code.
here is some code:
$url = "";
$handle = fopen($url, "r");
$row = fgetcsv($handle);
$_SESSION['variable_from_csv'] = $row[1];
fclose($handle);
In my case this is the URL ..
http://retsmd.com/index.php?action=export&r_resource=Property&r_class=ResidentialProperty
but it's asking for password.

No comments:

Post a Comment