<?php

/*
 * Created on 10.03.2012
 * Oliver Soop(osoop1@ut.ee)
 */
class CSVFileImporter {

	/**
	 * Meetod, mis tagastab kõik .csv failis asuvad v��rtused
	 */
	public static function getUrls($fileName) {
		$resultArray = array();
		if (($handle = fopen($fileName, "r")) !== FALSE) {
			while (($data = fgetcsv($handle, 10000, ";")) !== FALSE) {
				$num = count($data);
				for ($c = 0; $c < $num; $c++) {
					array_push($resultArray, $data[$c]);
				}
			}
			fclose($handle);
		}
		
		return $resultArray;
	}
}


?>
