<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                1. 取得指定網頁內的所有圖片 ~~~ <?php //取得指定位址的內容,并儲存至text $text=file_get_contents('http://www.zhix.net/'); //取得所有img標識,并儲存至二維陣列match preg_match_all('#<img[^>]*>#i', $text, $match); //印出match print_r($match); ?> ~~~ ?2. 取得指定網頁內的第一張圖片:測試 ~~~ <?php //取得指定位址的內容,并儲存至text $text=file_get_contents('http://www.zhix.net/'); //取得第一個img,并儲存至陣列match(regex語法與上述同義) preg_match('/<img[^>]*>/Ui', $text, $match); //印出match print_r($match); ?> ~~~ ?3. 取得指定網頁內的特定div區塊 ~~~ <?php //取得指定位址的內容,并儲存至text $text=file_get_contents('http://www.zhix.net/2018/01/'); //去除換行及空白字元(序列化內容才需使用) //$text=str_replace(array("r","n","t","s"), '', $text); //取出div且id為PostContent的內容,并儲存至陣列match preg_match('/<div[^>]*id="PostContent"[^>]*>(.*?) </div>/si',$text,$match); //印出match[0] print($match[0]); ?> ~~~ ?4. 上述2及3的結合:測試 ~~~ <?php //取得指定位址的內容,并儲存至text $text=file_get_contents('http://www.zhix.net/2018/01/'); //取出div標簽且id為PostContent的內容,并儲存至陣列match preg_match('/<div[^>]*id="PostContent"[^>]*>(.*?) </div>/si',$text,$match); //取得第一個img,并儲存至陣列match2 preg_match('/<img[^>]*>/Ui', $match[0], $match2); //印出match2[0] print_r($match2[0]); ?> ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看