function articletaggingWBase() { $LL = new LL_ArticleTagging_wbase(); //$LL->printColumlistAsAttributes(); if ($_GET['truncate']) { $LL->truncate(); } // $url = "http://192.168.0.86:8180/goldwebapi/ecommerce/articletagging"; // $url = "http://192.168.0.86:8880/goldwebapi/ecommerce/articletagging"; $url = $this->ip_address . "GOLDEcomm/ArticleTagging"; $data = file_get_contents($url); $data = json_decode($data, true); // Turns it into an array, change the last argument to false to make it an ob //pr($data); $counter = 0; $yangdisave = 0; foreach ($data as $ro) { $ll = new LL_ArticleTagging_wbase(); $ll->fill($ro); $ll->rel_id = $ro['BaseArticleID'] . "_" . $ro['TaggingLevel3ID']; if ($ll->save()) { echo $ll->rel_id . "<br>"; $yangdisave++; } $counter++; //pr($ll); } echo "Jumlah yang di crawl : " . $counter . "<br>"; echo "Jumlah yang di save : " . $yangdisave . "<br>"; }