Skip to content

Commit

Permalink
change $url to $filePath
Browse files Browse the repository at this point in the history
  • Loading branch information
hedii committed Jul 6, 2015
1 parent 266b130 commit 5a372ee
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ColissimoApi/ColissimoApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 5a372ee

Please sign in to comment.