我必須得到一個(gè)列表的輸出,該列表只包含 :8080 之類的端口,而不包含任何其他端口,因此 php 必須檢查網(wǎng)站是否包含任何帶有 :8080 端口的行,如果是,則必須打印整行。$url = "https://proxymagic.cc/Home/FreeProxies?accesskey=key";$str = file_get_contents($url);$lines = explode('', $str);foreach($lines as $line) { if (stripos($line, '8080') !== false) { $line = $output; }echo $output;}
- 2 回答
- 0 關(guān)注
- 195 瀏覽
添加回答
舉報(bào)
0/150
提交
取消