From 5a372eec470032c048ac2aec8d44a429b9e31db7 Mon Sep 17 00:00:00 2001 From: hedii Date: Mon, 6 Jul 2015 10:09:22 +0200 Subject: [PATCH] change $url to $filePath --- ColissimoApi/ColissimoApi.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ColissimoApi/ColissimoApi.php b/ColissimoApi/ColissimoApi.php index 14f9add..5300ce9 100644 --- a/ColissimoApi/ColissimoApi.php +++ b/ColissimoApi/ColissimoApi.php @@ -95,17 +95,17 @@ private function storeTable($data) } /** - * parse html table in the created file $url to a multidimensional array + * parse html table in the created file $filePath to a multidimensional array * * @source http://stackoverflow.com/a/10754009/2746369 - * @param $url + * @param $filePath * @return array */ - private function parse($url) + private function parse($filePath) { - $url = file_get_contents($url); + $content = file_get_contents($filePath); $dom = new DOMDocument(); - @$html = $dom->loadHTML(mb_convert_encoding($url, 'HTML-ENTITIES', 'UTF-8')); + @$html = $dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8')); $dom->preserveWhiteSpace = false; $tables = $dom->getElementsByTagName('table'); $rows = $tables->item(0)->getElementsByTagName('tr');