Accessing a .csv file on another server
Iím working on an idea that involves using PHP to grab a .csv file and parse it...but the thing is that the .csv in question is on a third party server. Obviously I would be asking for permission to use the file...itís nothing dodgy. My question is from the technical side of things on the server what are the issues involved ....being that itís a third party environment that Iím not involved with.
Ie. Is it only possible if they donít have a firewall or other restriction in place...or do I need to have CURL installed or my host needs to allow fsocketopen()
I thought I could use a code like this for example
Or perhaps I could use phpís ftp function or something.
$fileTemp = "http://www.somethirdpartysite.com/folder/thecsvfile.csv";
$fp = fopen($fileTemp,'r');
$datas = array()
while (($data = fgetcsv($fp)) !== FALSE)
$data['productName'] = trim($data);
$data['spec'] = trim($data);
$data['imageLocation'] = trim($data);
$datas = $data;
If anyone could advise Iíd be grateful.