陈德本 5 سال پیش
والد
کامیت
6616345faf
3فایلهای تغییر یافته به همراه13 افزوده شده و 17 حذف شده
  1. 1 1
      App/Api/Template/Message.phtml
  2. 9 14
      App/Script/Controller/Server.php
  3. 3 2
      Config/Proxy.php

+ 1 - 1
App/Api/Template/Message.phtml

@@ -22,7 +22,7 @@
             echo $this->number_info['country'] . " " . $this->number_info['phone'];
             if ($_GET['debug']==1){
                 echo " 页面耗时".(microtime_float()-PAGE_START);
-                echo " 使用".(USE_HOME?"自建代理":"猿代理");
+                echo " 使用代理【".USE_HOME."】";
             }
              ?></div>
         <div class="panel-body ">

+ 9 - 14
App/Script/Controller/Server.php

@@ -22,20 +22,15 @@ class Server extends Controller
      */
     protected function main()
     {
-//        $lib = new ReceiveSmsFree();
-
-        $lib=new Sms24();
-//        $data = $lib->getCountry();
-//        foreach ($data as $item) {
-//            $lib->getPhoneNums($item['link']);
-//        }
-        $link=["https://www.materialtools.com/?page=1","https://www.materialtools.com/?page=2","https://www.materialtools.com/?page=3"];
-        foreach ($link as $item) {
-            $data=$lib->getPhoneNums($item);
-            print_r($data);
-            die();
+        $tasks=[
+          new  ReceiveSmsFree(),
+          new  ReceiveSmsCc()
+        ];
+        foreach ($tasks as $task) {
+            $countries = $task->getCountry();
+            foreach ($countries as $country) {
+                $task->getPhoneNums($country['link']);
+            }
         }
-
-
     }
 }

+ 3 - 2
Config/Proxy.php

@@ -10,8 +10,9 @@ class Proxy extends Config
 {
     public static function getData($section = null)
     {
-        define("USE_HOME", false);
+        $proxy=file_get_contents("http://www.97admin.com:5555/random");
+        define("USE_HOME", $proxy);
         //        $data = json_decode($data, true);
-        return file_get_contents("http://www.97admin.com:5555/random");
+        return $proxy;
     }
 }