UpdateCurrencyRate.php
authorEdward <edward@roojs.com>
Mon, 20 Oct 2014 07:11:27 +0000 (15:11 +0800)
committerEdward <edward@roojs.com>
Mon, 20 Oct 2014 07:11:27 +0000 (15:11 +0800)
UpdateCurrencyRate.php

index 328efac..cd2cde7 100644 (file)
@@ -30,14 +30,19 @@ class Pman_Core_UpdateCurrencyRate extends Pman
         echo"'update currency exchange rate \n";
         
         $response = $this->curl($this->actionUrl, array(), 'GET');
-        file_put_contents('/tmp/test.html', $response);exit;
-        
         
         $doc = new DOMDocument();
         $doc->loadHTML($response);
         
         $xpath = new DOMXpath($doc);
         
+        $elements = $xpath->query("/html/body/select[@name='exch']");
+        
+        foreach($elements as $el) {
+            print_r($el);
+            echo "\n";
+        }
+        exit;
 //        $params = array(
 //            'lang' => 'en',
 //            'result' => 1,