|
|
@@ -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']);
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|