目录
Living Music校园歌唱大赛半决赛距离开赛还有???
回复内容:
首页 后端开发 php教程 正则表达式 - 如何用 php 抓取微信文章正文?

正则表达式 - 如何用 php 抓取微信文章正文?

Jun 06, 2016 pm 08:32 PM
php 微信 正则表达式

我是一个新手,想使用php抓取微信页面的正文和标题,标题直接用正则表达式|<title>(.*?)|i</title>就抓取到了,但是正文我想的是|>(.*?)匹配标签间的内容,再去掉空格,但是还是会匹配到一堆标签,是怎么回事?或者说有其他更好的方法吗?求指教!

http://mp.weixin.qq.com/s?__biz=MzA5NTQ2NjUzMA==&mid=207136729&...

这是一般的微信文章内容链接

下面是这链接的页面代码

<code><br>             <script type="text/javascript">
    var sampling = Math.random() < 0.001;
    var page_begintime = (+new Date());
    (sampling) && ((new Image()).src = "http://isdspeed.qq.com/cgi-bin/r.cgi?flag1=7839&flag2=7&flag3=8&15=1000&r=" + Math.random());

    var biz = "MzA5NTQ2NjUzMA==";
    var sn = "a82af7b7ba0bee9a7017b607dc7e5d4b" || "";
    var mid = "207136729" || "";
    var idx = "1" || "" ;

    //辟谣需求
    var is_rumor = ""*1;
    var norumor = ""*1;
    if (!!is_rumor&&!norumor){
      if (!document.referrer || document.referrer.indexOf("mp.weixin.qq.com/mp/rumor") == -1){
        location.href = "http://mp.weixin.qq.com/mp/rumor?action=info&__biz=" + biz + "&mid=" + mid + "&idx=" + idx + "&sn=" + sn + "#wechat_redirect";
      }
    }

    //原创需求,需要跳转到中间页
    /*
    var copyrightInfo = {
        display_source : ""*1,
        nocopyrightsource : ""*1
    };
    if (!!copyrightInfo.display_source&&!copyrightInfo.nocopyrightsource){
      if (!document.referrer || document.referrer.indexOf("mp.weixin.qq.com/mp/reprint") == -1){
        location.href = "http://mp.weixin.qq.com/mp/reprint?action=info&__biz=" + biz + "&mid=" + mid + "&idx=" + idx + "&sn=" + sn + "#wechat_redirect";
      }
    }*/
</script>        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="dns-prefetch" href="//res.wx.qq.com">
<link rel="dns-prefetch" href="//mmbiz.qpic.cn">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link rel="shortcut icon" type="image/x-icon" href="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/favicon22c41b.ico">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<script type="text/javascript">
    var uin = "";
    var key = "";
    var pass_ticket = "";

String.prototype.html= function(encode) {
    var replace =["&#39;", "'", """, '"', " ", " ", ">", ">", "<", "<", "&", "&", "&yen;", "¥"];
    //console.log(replace);
    if(encode){
        replace.reverse();
    }
    for (var i=0,str=this;i< replace.length;i+= 2){
         str=str.replace(new RegExp(replace[i],'g'),replace[i+1]);
    }

    return str;
};
pass_ticket = encodeURIComponent(pass_ticket.html(false).html(false).replace(/\s/g,"+"));
</script>        <title>Living Music校园歌唱大赛半决赛距离开赛还有???</title>        <link rel="stylesheet" type="text/css" href="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg/page_mp_article_improve251980.css"><style>         </style><!--[if lt IE 9]><link rel="stylesheet" type="text/css" href="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg/page_mp_article_improve_pc25624b.css"><![endif]--><script type="text/javascript">
    document.domain = "qq.com";
</script>    </head>    <body id="activity-detail" class="zh_CN mm_appmsg" ontouchstart="">            <script type="text/javascript">
        var write_sceen_time = (+new Date());
        (sampling) && ((new Image()).src = "http://isdspeed.qq.com/cgi-bin/r.cgi?flag1=7839&flag2=7&flag3=8&16=1000&r=" + Math.random());
    </script>        <div id="js_cmt_mine" class="discuss_container editing access" style="display:none;">        <div class="discuss_container_inner">            <h2 id="Living-Music校园歌唱大赛半决赛距离开赛还有">Living Music校园歌唱大赛半决赛距离开赛还有???</h2>            <div class="frm_textarea_box_wrp">                <span class="frm_textarea_box">                    <textarea id="js_cmt_input" class="frm_textarea" placeholder="评论将由公众帐号筛选后显示,对所有人可见。"></textarea>                </span>            </div>            <div class="discuss_btn_wrp"><a id="js_cmt_submit" class="btn btn_primary btn_discuss btn_disabled" href="javascript:;">提交</a></div>            <div class="discuss_list_wrp" style="display:none">                <div class="rich_tips with_line title_tips discuss_title_line">                    <span class="tips">我的评论</span>                </div>                <ul class="discuss_list" id="js_cmt_mylist"></ul>            </div>            <div class="rich_tips tips_global loading_tips" id="js_mycmt_loading">                <img class="rich_icon icon_loading_white lazy"  src="/static/imghw/default1.png"  data-src="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/icon_loading_white22c04a.gif"  alt="">                <span class="tips">加载中</span>            </div>            <div class="wx_poptips" id="js_cmt_toast"   style="max-width:90%">                <img class="icon_toast lazy"  src="/static/imghw/default1.png"  data-src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAABqCAYAAABUIcSXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3NpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xL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qabiqPgup1yKyQwvC2tSefZ73SSpNkUJ4PlLorlHZ+446nc8f3fIyywlJhwrTuwVSjBa1ccvSxN0hjjoK5xVrYZMd9V6XbFfgBukixTwGLg8sDam3dZR/wZ6L/dJlin1en8LS+bgpFbz3Ygvzu1J1HKxYNqxGpCmaCEo12rrBorD6LRp8UbpcdR5VWhTW35KlKd6QFqjuM2XzwlpnMxTvSkuUwuG/Xlg6NtPjbT6WFimF/VG6LEvXgn8QGDjMbBukVECFwhpoS+CQatfX2Q1q6H7wENHdrfCr0lKleEB9JyxNneus+VJpsVL9TwI6W65LovWIGl3KtVJaLv7LBwYTFEERFEVQFEERFEVQFEERFEVQFEERFEVQFEERFEVQFEERFFWq/hFgADUMN4RzT6/OAAAAAElFTkSuQmCC"  alt="">                <p class="toast_content">已评论</p>            </div>        </div>    </div>    <div id="js_article" class="rich_media">                <div id="js_top_ad_area" class="top_banner">         </div>                        <div class="rich_media_inner">            <div id="page-content">                <div id="img-content" class="rich_media_area_primary">                    <h2 id="Living-Music校园歌唱大赛半决赛距离开赛还有">                        Living Music校园歌唱大赛半决赛距离开赛还有???                     </h2>                    <div class="rich_media_meta_list">                                                <em id="post-date" class="rich_media_meta rich_media_meta_text">2015-04-27</em>                                                <a class="rich_media_meta rich_media_meta_link rich_media_meta_nickname" href="javascript:void(0);" id="post-user">gzgsytw</a>                        <span class="rich_media_meta rich_media_meta_text rich_media_meta_nickname">gzgsytw</span>                        <div id="js_profile_qrcode" class="profile_container"   style="max-width:90%">                            <div class="profile_inner">                                <strong class="profile_nickname">gzgsytw</strong>                                <img class="profile_avatar lazy"  src="/static/imghw/default1.png"  data-src="http://mmbiz.qpic.cn/mmbiz/UeZYRwyWLxVbrSdHIQokUcfwqLgHDeHAOIct2NKByo5P7WOGqux1uqDFAfUH922afy36pc8Ge8t8nyNCxKK6Ng/0"  id="js_profile_qrcode_img" alt="">                                <p>                                <label>微信号</label>                                <span>gzgsytw0</span>                                </p>                                <p>                                <label>功能介绍</label>                                <span>校园内有关团委的一切动态一切资讯都可在这里接收查找。</span>                                </p>                                                            </div>                            <span id="js_profile_arrow_wrp">                                <i></i>                                <i></i>                            </span>                        </div>                    </div>                                                                                                                                                                <div id="js_content"><fieldset   style="max-width:90%"><span style="display: inline-block; padding: 0.3em 0.5em; border-radius: 0.5em; color: rgb(255, 255, 255); text-align: inherit; font-size: 1em; box-shadow: rgb(165, 165, 165) 0.2em 0.2em 0.1em; font-family: inherit; font-weight: inherit; text-decoration: inherit; border-color: rgb(71, 193, 168); box-sizing: border-box; background-color: rgb(71, 193, 168);"><p style="box-sizing: border-box;"><span style="font-size: 24px;">Living Music校园歌唱大赛半决赛距离开赛还有???</span></p></span></fieldset><p style="white-space: normal;"><br  /></p><fieldset style="white-space: normal; border: 0px; margin: 0px; clear: both; box-sizing: border-box; padding: 0px;"><section style="padding: 8px; margin: 0px; border-left-width: 6px; border-left-style: solid; border-color: rgb(71, 193, 168); font-size: 1em; line-height: 1.4; text-align: inherit; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: rgb(51, 51, 51); box-sizing: border-box;"><section style="box-sizing: border-box;"><p><span style="font-size: 18px; font-family: 宋体;">精彩绝伦的复赛没有来观看?没关系!30进15的淘汰赛已经结束,15进5的半决赛就在<span style="font-size: 36px; font-family: 宋体; color: rgb(49, 133, 155);"><strong>今晚!</strong></span></span></p></section></section></fieldset><p style="white-space: normal;"><img  class="profile_avatar lazy"  src="/static/imghw/default1.png"  data-src="http://mmbiz.qpic.cn/mmbiz/UeZYRwyWLxVbrSdHIQokUcfwqLgHDeHAOIct2NKByo5P7WOGqux1uqDFAfUH922afy36pc8Ge8t8nyNCxKK6Ng/0"  data-s="300,640" data-type="jpeg" data- data-ratio="0.726790450928382" data-w="377"  / alt="正则表达式 - 如何用 php 抓取微信文章正文?" ><br  /></p><p   style="max-width:90%"><br  /></p><fieldset class="tn-Powered-by-XIUMI" style="white-space: normal; border: 0px; margin: 0px; clear: both; box-sizing: border-box; padding: 0px;"><section class="tn-Powered-by-XIUMI" style="padding: 8px; margin: 0px; border-left-width: 6px; border-left-style: solid; border-color: rgb(71, 193, 168); font-size: 1em; line-height: 1.4; text-align: inherit; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: rgb(51, 51, 51); box-sizing: border-box;"><section class="tn-Powered-by-XIUMI" style="box-sizing: border-box;"><p><span style="font-size: 36px;"><strong><span style="font-family: 宋体; color: rgb(49, 133, 155);">今晚六点半</span></strong></span><span style="font-size: 18px;"><strong><span style="font-family: 宋体; color: rgb(49, 133, 155);"></span></strong><span style="font-family: 宋体;">Living Music大赛花都校区的十五强选手将在<span style="font-size: 36px; font-family: 宋体; color: rgb(49, 133, 155);"><strong>实验楼105</strong></span>举行的半决赛当中角逐出进入最终决赛的五名选手,届时将和三水校区进入决赛的五名选手共同组成广工商十强歌手来竞争广工商<span style="font-size: 36px; font-family: 宋体; color: rgb(255, 0, 0);"><strong>最强音的宝座!!</strong></span></span></span></p></section></section></fieldset><p style="white-space: normal;"><img  src="/static/imghw/default1.png"  data-src="http://mmbiz.qpic.cn/mmbiz/UeZYRwyWLxVicCIE0fvVEsL865N96Ds2cuLr8deLzfyGmmNLd5dKgP4m0FQ57uNewg4tMn2wiadSxhEMqptr1dxQ/0"  class="lazy"  data-s="300,640" data-type="jpeg" data- data-ratio="0.5964912280701754" data-w="456"  / alt="正则表达式 - 如何用 php 抓取微信文章正文?" ><br  /></p><fieldset class="tn-Powered-by-XIUMI"   style="max-width:90%"><section class="tn-Powered-by-XIUMI" style="padding: 8px; margin: 0px; border-left-width: 6px; border-left-style: solid; border-color: rgb(71, 193, 168); font-size: 1em; line-height: 1.4; text-align: inherit; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: rgb(51, 51, 51); box-sizing: border-box;"><section class="tn-Powered-by-XIUMI" style="box-sizing: border-box;"><span style="font-size: 18px;">广工商最强音的诞生需要你的见证,come on 小伙伴,即使不是最专业的点评家,你也可以是<span style="font-size: 36px; color: rgb(49, 133, 155);"><strong>最专业的聆听者</strong></span><span style="font-size: 36px; color: rgb(49, 133, 155);">!</span></span></section></section></fieldset><p style="white-space: normal;"><img  src="/static/imghw/default1.png"  data-src="http://mmbiz.qpic.cn/mmbiz/UeZYRwyWLxV1eIfFV9Do2a4aUp0koiadsKydXaDL3d696kOuEpXq5XSbrHk86fnicm6tG8ZPlQI6BsukIMlQmjGg/0"  class="lazy"  data-s="300,640" data-type="jpeg" data- data-ratio="1.0588235294117647" data-w="289"  / alt="正则表达式 - 如何用 php 抓取微信文章正文?" ><br  /></p><fieldset class="tn-Powered-by-XIUMI"   style="max-width:90%"><section class="tn-Powered-by-XIUMI" style="padding: 20px; color: rgb(255, 255, 255); text-align: center; font-weight: bold; line-height: 1.4; box-shadow: rgb(221, 221, 221) 0px 3px 3px; font-size: 1.4em; font-family: inherit; text-decoration: inherit; border-color: rgb(71, 193, 168); box-sizing: border-box; background-color: rgb(71, 193, 168);"><section class="tn-Powered-by-XIUMI" style="box-sizing: border-box;"><strong><span style="font-family: 宋体; font-size: 24px; line-height: 25.2000007629395px;"><span style="line-height: 28px;">Living Music大赛花都校区</span>15进5的半决赛</span></strong></section></section><p style="margin-top: 24px; text-align: inherit; font-size: 1em; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: inherit; border-color: rgb(71, 193, 168); box-sizing: border-box; line-height: 2em; background-color: transparent;"><img  class="tn-Powered-by-XIUMI lazy"  src="/static/imghw/default1.png"  data-src="http://mmbiz.qpic.cn/mmbiz/MVPvEL7Qg0GPLZlicQq2RYNicbDmd1xQT0Gicv1A0tlNRtyWzrwk4Odopjzzpwqo4YJkUl3x7nMbGeLATIszGPJ2Q/640"  data- data-ratio="1" data-w="30"   style="max-width:90%"  / alt="正则表达式 - 如何用 php 抓取微信文章正文?" > <span style="line-height: 25.6000003814697px; color: inherit; font-family: inherit; font-size: 1em; font-weight: inherit; text-align: inherit; text-decoration: inherit;">4月27日18:30(即今晚)</span></p><p style="margin-top: 16px; text-align: inherit; font-size: 1em; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: inherit; border-color: rgb(71, 193, 168); box-sizing: border-box; background-color: transparent;"><img  class="tn-Powered-by-XIUMI lazy"  src="/static/imghw/default1.png"  data-src="http://mmbiz.qpic.cn/mmbiz/MVPvEL7Qg0GPLZlicQq2RYNicbDmd1xQT0xTVEAtw1fibKcv7QmGPZ2SPibJyDvCcAI1jgWFZxhxb1XSBViae9ibboJg/640"  data- data-ratio="1" data-w="30"   style="max-width:90%"  / alt="正则表达式 - 如何用 php 抓取微信文章正文?" > <span style="line-height: 25.6000003814697px; color: inherit; font-family: inherit; font-size: 1em; font-weight: inherit; text-align: inherit; text-decoration: inherit;">实验楼105</span></p><p style="margin-top: 16px; text-align: inherit; font-size: 1em; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: inherit; border-color: rgb(71, 193, 168); box-sizing: border-box; background-color: transparent;"><span style="line-height: 25.6000003814697px; color: inherit; font-family: inherit; font-size: 1em; font-weight: inherit; text-align: inherit; text-decoration: inherit;"><br  /></span></p></fieldset><p><br  /></p></div>                    <script type="text/javascript">
                        var first_sceen__time = (+new Date());
                    </script>                    <link rel="stylesheet" type="text/css" href="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg/page_mp_article_improve_combo25624b.css">                                                                                                    <div class="rich_media_tool" id="js_toobar">                                                <div id="js_read_area" class="media_tool_meta tips_global meta_primary" style="display:none;">阅读 <span id="readNum"></span></div>                        <span style="display:none;" class="media_tool_meta meta_primary tips_global meta_praise" id="like">                            <i class="icon_praise_gray"></i><span class="praise_num" id="likeNum"></span>                        </span>                        <a id="js_report_article" style="display:none;" class="media_tool_meta tips_global meta_extra" href="javascript:void(0);">举报</a>                    </div>                </div>                <div class="rich_media_area_extra">                                        <div class="mpda_bottom_container" id="js_bottom_ad_area"></div>                                        <div id="js_iframetest" style="display:none;"></div>                                                        </div>                           </div>            <div id="js_pc_qr_code" class="qr_code_pc_outer" style="display:none;">                <div class="qr_code_pc_inner">                    <div class="qr_code_pc">                        <img  class="qr_code_pc_img lazy"  src="/static/imghw/default1.png"  data-src="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/moon230eaa.js"  id="js_pc_qr_code_img" alt="正则表达式 - 如何用 php 抓取微信文章正文?" >                        <p>微信扫一扫<br>关注该公众号</p>                    </div>                </div>            </div>        </div>    </div>                <script>window.moon_map = {"a/gotoappdetail.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/gotoappdetail2562f8.js","a/ios.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/ios24a769.js","a/android.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/android22772d.js","a/profile.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/profile24a2ff.js","biz_common/utils/report.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/report224ef3.js","biz_common/utils/cookie.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/cookie224ef3.js","appmsg/reward_entry.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/reward_entry256315.js","appmsg/comment.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment255696.js","appmsg/like.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/like2340dc.js","appmsg/a.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/a25624b.js","biz_common/tmpl.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/tmpl224ef3.js","biz_common/ui/imgonepx.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/ui/imgonepx224ef3.js","biz_common/dom/attr.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/attr22f190.js","biz_wap/utils/ajax.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax22589f.js","biz_common/utils/string/html.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/string/html224ef3.js","appmsg/report.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/report23c757.js","biz_common/dom/class.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/class236751.js","appmsg/report_and_source.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/report_and_source23a582.js","appmsg/page_pos.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/page_pos253aa9.js","appmsg/cdn_speed_report.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cdn_speed_report224ef3.js","appmsg/iframe.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/iframe24f185.js","appmsg/review_image.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/review_image2480be.js","appmsg/outer_link.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/outer_link224ef3.js","biz_wap/jsapi/core.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/core22589f.js","biz_common/dom/event.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/event24f08a.js","appmsg/async.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/async25624b.js","biz_wap/ui/lazyload_img.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/ui/lazyload_img23354e.js","biz_common/log/jserr.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/log/jserr22589f.js","appmsg/share.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/share251ea5.js","biz_wap/utils/mmversion.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/mmversion224ef3.js","appmsg/cdn_img_lib.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cdn_img_lib23c757.js","biz_common/utils/url/parse.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/url/parse238f07.js","appmsg/index.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/index2567e4.js"};</script><script type="text/javascript"></script>    <script id="t_cmt" type="text/html">
        <li class="discuss_item" id="cid<# if (is_from_me == 1) { #><#=my_id#><# } else { #><#=content_id#><# } #>">
            <# if(is_elected == 1){ #>


<div class="discuss_opr">
                <span class="media_tool_meta tips_global meta_praise js_comment_praise <# if(like_status == 1){ #>praised<# } #>" data-status="<#=like_status#>" data-content-id='<#=content_id#>'>
                    <i class="icon_praise_gray"></i>
                    <span class="praise_num"><# if(like_num_format !== 0){ #><#=like_num_format#> <# } #></span>
                </span>
            </div>


            <# } #>
            <div class="user_info">
                <strong class="nickname"><#=nick_name#><# if(is_from_friend == 1){ #>(朋友)<# } #></strong>
                <img  class="avatar lazy"  src="/static/imghw/default1.png"  data-src="<#=logo_url# alt="正则表达式 - 如何用 php 抓取微信文章正文?" >" >
            </div>
            <div class="discuss_message">
                <span class="discuss_status"><#=status#></span>
                <#=content#>
            </div>
            <p class="discuss_extra_info">
                <#=time#>               
                <# if (is_from_me == 1) { #>
                <a class="discuss_del js_del" href="javascript:;" data-my-id="<#=my_id#>" data-content-id="<#=content_id#>">删除</a>
                <# } #>
            </p>
            <# if(reply && reply.reply_list && reply.reply_list.length > 0){ #>
                <div class="reply_result">
                    <div class="nickname">作者回复</div>
                    <div class="discuss_message"><#=reply.reply_list[0].content#></div>
                    <p class="discuss_extra_info"><#=reply.reply_list[0].time#></p>
                </div>
            <# } #>

        </li>
    </script>  <script id="t_ad" type="text/html">
    <div class="rich_media_extra" id="gdt_area">
        <# if(pos_type==0){ #>
        <div class="rich_tips with_line title_tips">
            <span class="tips">推广</span>
        </div>
        <# } #>
        <div class="js_ad_link extra_link" data-type="<#=type#>" data-ticket="<#=ticket#>" data-url="<#=url#>" data-rl="<#=rl#>"  data-aid="<#=aid#>" data-pt="<#=pt#>" data-tid="<#=traceid#>" data-gid="<#=group_id#>" data-apurl="<#=apurl#>">
            <# if(pt==1){ #>
            <#=hint_txt#>
            <img  class="icon_arrow_gray lazy"  src="/static/imghw/default1.png"  data-src="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/icon_arrow_gray1ef6d4.png"  alt="正则表达式 - 如何用 php 抓取微信文章正文?" >
            <img  class="icon_loading_white icon_after lazy"  src="/static/imghw/default1.png"  data-src="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/icon_loading_white22c04a.gif"    style="max-width:90%" id="loading_<#=traceid# alt="正则表达式 - 如何用 php 抓取微信文章正文?" >">
            <# }else if(pt==2){ #>

            <# if (logo.indexOf("http://mmsns.qpic.cn/") == 0){ #>
            <div class="brand_logo"><img  src="/static/imghw/default1.png"  data-src="<#=logo# alt="正则表达式 - 如何用 php 抓取微信文章正文?" >"  class="lazy" alt="logo图片"></div>
            <# } #>
            <img  class="appmsg_banner lazy"  src="/static/imghw/default1.png"  data-src="<#=image_url# alt="正则表达式 - 如何用 php 抓取微信文章正文?" >" >
            <# if(watermark_type!=0){ #><i class="promotion_tag"><# if(watermark_type==1){ #>商品推广<# }else if (watermark_type==2){ #>活动推广<# } #></i><# } #>
            <# }else if(pt==7){ #>

            <div class="preview_group preview_card">
                <div class="preview_group_inner card_inner">
                    <div class="preview_group_info">
                        <strong class="preview_group_title2"><#=hint_txt#></strong>
                        <div class="preview_group_desc"><#=ad_desc#></div>
                        <img  src="/static/imghw/default1.png"  data-src="<#=image_url# alt="正则表达式 - 如何用 php 抓取微信文章正文?" >"  class="lazy" alt="" class="preview_card_avatar">
                    </div>
                </div>
            </div>
            <# }else if(pt==100){ #>
            <div class="preview_group">
                <div class="preview_group_inner">
                    <div class="preview_group_info append_btn">
                        <strong class="preview_group_title"><#=biz_info.nick_name#></strong>
                        <div class="preview_group_desc"><#=hint_txt#></div>
                        <# if(!!biz_info.head_img){ #>
                        <img  src="/static/imghw/default1.png"  data-src="<#=biz_info.head_img# alt="正则表达式 - 如何用 php 抓取微信文章正文?" >"  class="lazy" alt="" class="preview_group_avatar br_radius">
                        <# }else{ #>
                        <img class="preview_group_avatar br_radius lazy"  src="/static/imghw/default1.png"  data-src="http://mmbiz.qpic.cn/mmbiz/a5icZrUmbV8p5jb6RZ8aYfjfS2AVle8URwBt8QIu6XbGewB9wiaWYWkPwq4R7pfdsFibuLkic16UcxDSNYtB8HnC1Q/0"  alt="<#=biz_info.nick_name#>">
                        <# } #>                                 
                    </div>
                    <div class="preview_group_opr">
                        <a id="js_view_profile_<#=pos_type#>" <# if(biz_info.is_subscribed == 0){ #>style="display:none"<# } #> class="btn btn_inline btn_primary btn_line js_ad_btn" href="javascript:void(0);">查看</a>
                        <a id="js_add_contact_<#=pos_type#>" data-url="<#=url#>" data-type="<#=type#>" data-tid="<#=traceid#>" data-rl="<#=rl#>" <# if(biz_info.is_subscribed ==1){ #>style="display:none"<# } #> class="btn btn_inline btn_line  btn_primary js_ad_btn" href="javascript:void(0);">关注</a>
                    </div>
                </div>
            </div>
            <# }else if(pt==102){ #>
            <div class="preview_group">
                <div class="preview_group_inner">
                    <div class="preview_group_info append_btn">
                        <strong class="preview_group_title"><#=app_info.app_name#></strong>
                        <div class="preview_group_desc"><#=hint_txt#></div>
                        <img  src="/static/imghw/default1.png"  data-src="<#=app_info.icon_url# alt="正则表达式 - 如何用 php 抓取微信文章正文?" >"  class="lazy" alt="" class="preview_group_avatar br_radius">
                    </div>
                    <div class="preview_group_opr">
                        <a id="js_app_action_<#=pos_type#>" class="btn btn_inline btn_primary js_ad_btn btn_download" href="javascript:void(0);">下载</a>
                    </div>
                </div>
            </div>
            <# }else if(pt==101){ #>
            <div class="preview_group preview_card">
                <div class="preview_group_inner card_inner">                            
                    <div class="preview_group_info append_btn">
                        <strong class="preview_group_title"><#=app_info.app_name#></strong>
                        <div class="preview_group_desc"><#=hint_txt#></div>
                        <img  src="/static/imghw/default1.png"  data-src="<#=app_info.icon_url# alt="正则表达式 - 如何用 php 抓取微信文章正文?" >"  class="lazy" alt="" class="preview_card_avatar">                               
                    </div>
                    <div class="preview_group_opr">
                        <a href="javascript:void(0);" id="js_app_action_<#=pos_type#>" class="btn btn_inline btn_primary js_ad_btn">下载</a>
                    </div>
                </div>                        
            </div>
            <# }else if(pt==103||pt==104){ #>
            <div class="preview_group obvious_app">
                <div class="preview_group_inner">
                    <div class="pic_app">
                        <img  src="/static/imghw/default1.png"  data-src="<#=image_url# alt="正则表达式 - 如何用 php 抓取微信文章正文?" >"  class="lazy" alt="">
                    </div>
                    <div class="info_app">
                        <p class="name_app"><#=app_info.app_name#></p>
                        <# if(pt==103){ #>
                        <p class="profile_app" style="display:none;"><span class="fun_exp"><#=app_info._category#></span><em>|</em><span class="compacity"><#=app_info._app_size#></span></p>
                        <# } else if(pt==104){ #>
                        <p class="profile_app" style="display:none;"><span class="fun_exp"><#=app_info._app_size#></span><em>|</em><span class="compacity"><#=app_info._down_count#></span></p>
                        <# } #>

                        <p class="grade_app" id="js_app_rating_<#=pos_type#>">

                            <span class="js_stars stars" style="display:none;"></span>

                            <span class="js_scores scores">暂无评分</span>
                        </p>
                        <div class="dm_app">
                            <a href="javascript:void(0);" id="js_appdetail_action_<#=pos_type#>" class="ad_btn btn_download js_ad_btn">下载</a>
                            <p class="extra_info">来自<# if(pt==103){ #>App Store<# }else{ #>腾讯应用宝<# } #></p>
                        </div>
                    </div>
                </div>            
            </div>
            <# } #>
        </div>
    </div>
  </script>  

<script type="text/javascript">
      var not_in_mm_css = "http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg/not_in_mm24ed02.css";
      var tid = "";
      var aid = "";
      var appuin = "MzA5NTQ2NjUzMA==";

      var source = "5";
      var scene = 75;
      
      var itemidx = "";
      var nickname = "gzgsytw";
      var ct = "1430117426";
      var user_name = "gh_33771b05aabb";
      var user_name_new = "";
      var fakeid   = "";
      var version   = "";
      var is_limit_user   = "0";
      var msg_title = "Living Music校园歌唱大赛半决赛距离开赛还有???";
      var msg_desc = "Living Music校园歌唱大赛半决赛距离开赛还有???精彩绝伦的复赛没有来观看?没关系!30进15的淘";
      var msg_cdn_url = "http://mmbiz.qpic.cn/mmbiz/UeZYRwyWLxUfLK8xco6YMfZA4gghicMQOabZNs7h3QsZqiaXAwKzic0ca3SESBko2AeeeOwFpkyGs41cTrhL6ewhA/0?wx_fmt=jpeg";
      var msg_link = "http://mp.weixin.qq.com/s?__biz=MzA5NTQ2NjUzMA==&mid=207136729&idx=1&sn=a82af7b7ba0bee9a7017b607dc7e5d4b#rd";
      var user_uin = "0"*1;
      var msg_source_url = '';
      var img_format = 'jpeg';
      var networkType;
      var appmsgid = '' || '207136729';
      var comment_id = "0" * 1;
      var svr_time = "1430658137" * 1;
      var comment_enabled = "" * 1;
      var is_need_reward = "0" * 1;
      var is_https_res = ("" * 1) && (location.protocol == "https:");

      var devicetype = "";

      seajs.use("appmsg/index.js");
  </script>

    </body></html>
</code>
登录后复制

回复内容:

我是一个新手,想使用php抓取微信页面的正文和标题,标题直接用正则表达式|<title>(.*?)<\/title>|i就抓取到了,但是正文我想的是|>(.*?)<\/|i匹配标签间的内容,再去掉空格,但是还是会匹配到一堆标签,是怎么回事?或者说有其他更好的方法吗?求指教!

http://mp.weixin.qq.com/s?__biz=MzA5NTQ2NjUzMA==&mid=207136729&...

这是一般的微信文章内容链接

下面是这链接的页面代码

<code><br><!DOCTYPE html><html>    <head>         <script type="text/javascript">
    var sampling = Math.random() < 0.001;
    var page_begintime = (+new Date());
    (sampling) && ((new Image()).src = "http://isdspeed.qq.com/cgi-bin/r.cgi?flag1=7839&flag2=7&flag3=8&15=1000&r=" + Math.random());

    var biz = "MzA5NTQ2NjUzMA==";
    var sn = "a82af7b7ba0bee9a7017b607dc7e5d4b" || "";
    var mid = "207136729" || "";
    var idx = "1" || "" ;

    //辟谣需求
    var is_rumor = ""*1;
    var norumor = ""*1;
    if (!!is_rumor&&!norumor){
      if (!document.referrer || document.referrer.indexOf("mp.weixin.qq.com/mp/rumor") == -1){
        location.href = "http://mp.weixin.qq.com/mp/rumor?action=info&__biz=" + biz + "&mid=" + mid + "&idx=" + idx + "&sn=" + sn + "#wechat_redirect";
      }
    }

    //原创需求,需要跳转到中间页
    /*
    var copyrightInfo = {
        display_source : ""*1,
        nocopyrightsource : ""*1
    };
    if (!!copyrightInfo.display_source&&!copyrightInfo.nocopyrightsource){
      if (!document.referrer || document.referrer.indexOf("mp.weixin.qq.com/mp/reprint") == -1){
        location.href = "http://mp.weixin.qq.com/mp/reprint?action=info&__biz=" + biz + "&mid=" + mid + "&idx=" + idx + "&sn=" + sn + "#wechat_redirect";
      }
    }*/
</script>        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link rel="dns-prefetch" href="//res.wx.qq.com"><link rel="dns-prefetch" href="//mmbiz.qpic.cn"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" /><link rel="shortcut icon" type="image/x-icon" href="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/favicon22c41b.ico"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="format-detection" content="telephone=no"><script type="text/javascript">
    var uin = "";
    var key = "";
    var pass_ticket = "";

String.prototype.html= function(encode) {
    var replace =["&#39;", "'", """, '"', " ", " ", ">", ">", "<", "<", "&", "&", "&yen;", "¥"];
    //console.log(replace);
    if(encode){
        replace.reverse();
    }
    for (var i=0,str=this;i< replace.length;i+= 2){
         str=str.replace(new RegExp(replace[i],'g'),replace[i+1]);
    }

    return str;
};
pass_ticket = encodeURIComponent(pass_ticket.html(false).html(false).replace(/\s/g,"+"));
</script>        <title>Living Music校园歌唱大赛半决赛距离开赛还有???</title>        <link rel="stylesheet" type="text/css" href="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg/page_mp_article_improve251980.css">
<style>         </style>
<!--[if lt IE 9]><link rel="stylesheet" type="text/css" href="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg/page_mp_article_improve_pc25624b.css"><![endif]--><script type="text/javascript">
    document.domain = "qq.com";
</script>                    <script type="text/javascript">
        var write_sceen_time = (+new Date());
        (sampling) && ((new Image()).src = "http://isdspeed.qq.com/cgi-bin/r.cgi?flag1=7839&flag2=7&flag3=8&16=1000&r=" + Math.random());
    </script>        <div id="js_cmt_mine" class="discuss_container editing access" style="display:none;">        <div class="discuss_container_inner">            <h2 id="Living-Music校园歌唱大赛半决赛距离开赛还有">Living Music校园歌唱大赛半决赛距离开赛还有???</h2>            <div class="frm_textarea_box_wrp">                <span class="frm_textarea_box">                    <textarea id="js_cmt_input" class="frm_textarea" placeholder="评论将由公众帐号筛选后显示,对所有人可见。"></textarea>                </span>            </div>            <div class="discuss_btn_wrp"><a id="js_cmt_submit" class="btn btn_primary btn_discuss btn_disabled" href="javascript:;">提交</a></div>            <div class="discuss_list_wrp" style="display:none">                <div class="rich_tips with_line title_tips discuss_title_line">                    <span class="tips">我的评论</span>                </div>                <ul class="discuss_list" id="js_cmt_mylist"></ul>            </div>            <div class="rich_tips tips_global loading_tips" id="js_mycmt_loading">                <img class="rich_icon icon_loading_white lazy" src="/static/imghw/default1.png" data-src="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/images/icon/common/icon_loading_white22c04a.gif" alt="">                <span class="tips">加载中</span>            </div>            <div class="wx_poptips" id="js_cmt_toast"   style="max-width:90%">                <img class="icon_toast lazy" src="/static/imghw/default1.png" data-src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAABqCAYAAABUIcSXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3NpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3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AsDXgehfdx1KkkTRE76tN+Xue2jnTU0Ru1oIbvpt30bBtKhOp5yaaRkts0lic8V1i6dPcIRx2d/l8Y8XtNNEg7OOo8bl1kmmOKnDsO88CaYzejau0hWZqiL7C83oCH4SeTHvwV2BqqsHRVztSEYOmWF80NeXZT6Hd4KflResE9vCnBOlCyGfDNAstHTVPUDWoQ1t3iW+9WNizvlhfd4aerXd+ThqiMfNR6+9LvOOro5OY5JX2H4+F7HZD+kGzlamMgldWiirQsjcwWFbjmqZJteekJLK9pisvgL6RhKvuciZiwzrWWGapfrPy30kBVcSBIrw0aD3PU0XB6cehntq7rTMf7/2iQlktDVdXJLXlg6VjmiYBn6rWSTRCH6hvJ0hQrpcGq8oidsmHpTP8t8DGO9/vcWt9qabiqPgup1yKyQwvC2tSefZ73SSpNkUJ4PlLorlHZ+446nc8f3fIyywlJhwrTuwVSjBa1ccvSxN0hjjoK5xVrYZMd9V6XbFfgBukixTwGLg8sDam3dZR/wZ6L/dJlin1en8LS+bgpFbz3Ygvzu1J1HKxYNqxGpCmaCEo12rrBorD6LRp8UbpcdR5VWhTW35KlKd6QFqjuM2XzwlpnMxTvSkuUwuG/Xlg6NtPjbT6WFimF/VG6LEvXgn8QGDjMbBukVECFwhpoS+CQatfX2Q1q6H7wENHdrfCr0lKleEB9JyxNneus+VJpsVL9TwI6W65LovWIGl3KtVJaLv7LBwYTFEERFEVQFEERFEVQFEERFEVQFEERFEVQFEERFEVQFEERFFWq/hFgADUMN4RzT6/OAAAAAElFTkSuQmCC" alt="">                <p class="toast_content">已评论</p>            </div>        </div>    </div>    <div id="js_article" class="rich_media">                <div id="js_top_ad_area" class="top_banner">         </div>                        <div class="rich_media_inner">            <div id="page-content">                <div id="img-content" class="rich_media_area_primary">                    <h2 id="Living-Music校园歌唱大赛半决赛距离开赛还有">                        Living Music校园歌唱大赛半决赛距离开赛还有???                     </h2>                    <div class="rich_media_meta_list">                                                <em id="post-date" class="rich_media_meta rich_media_meta_text">2015-04-27</em>                                                <a class="rich_media_meta rich_media_meta_link rich_media_meta_nickname" href="javascript:void(0);" id="post-user">gzgsytw</a>                        <span class="rich_media_meta rich_media_meta_text rich_media_meta_nickname">gzgsytw</span>                        <div id="js_profile_qrcode" class="profile_container"   style="max-width:90%">                            <div class="profile_inner">                                <strong class="profile_nickname">gzgsytw</strong>                                <img class="profile_avatar lazy" src="/static/imghw/default1.png" data-src="http://mmbiz.qpic.cn/mmbiz/UeZYRwyWLxVbrSdHIQokUcfwqLgHDeHAOIct2NKByo5P7WOGqux1uqDFAfUH922afy36pc8Ge8t8nyNCxKK6Ng/0" id="js_profile_qrcode_img" alt="">                                <p>                                <label>微信号</label>                                <span>gzgsytw0</span>                                </p>                                <p>                                <label>功能介绍</label>                                <span>校园内有关团委的一切动态一切资讯都可在这里接收查找。</span>                                </p>                                                            </div>                            <span id="js_profile_arrow_wrp">                                <i></i>                                <i></i>                            </span>                        </div>                    </div>                                                                                                                                                                <div id="js_content">
<fieldset style="white-space: normal; border: 0px; text-align: center; margin: 0.8em 0px 0.5em; box-sizing: border-box; padding: 0px;"><span style="display: inline-block; padding: 0.3em 0.5em; border-radius: 0.5em; color: rgb(255, 255, 255); text-align: inherit; font-size: 1em; box-shadow: rgb(165, 165, 165) 0.2em 0.2em 0.1em; font-family: inherit; font-weight: inherit; text-decoration: inherit; border-color: rgb(71, 193, 168); box-sizing: border-box; background-color: rgb(71, 193, 168);"><p style="box-sizing: border-box;"><span style="font-size: 24px;">Living Music校园歌唱大赛半决赛距离开赛还有???</span></p></span></fieldset>
<p style="white-space: normal;"><br></p>
<fieldset style="white-space: normal; border: 0px; margin: 0px; clear: both; box-sizing: border-box; padding: 0px;"><section style="padding: 8px; margin: 0px; border-left-width: 6px; border-left-style: solid; border-color: rgb(71, 193, 168); font-size: 1em; line-height: 1.4; text-align: inherit; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: rgb(51, 51, 51); box-sizing: border-box;"><section style="box-sizing: border-box;"><p><span style="font-size: 18px; font-family: 宋体;">精彩绝伦的复赛没有来观看?没关系!30进15的淘汰赛已经结束,15进5的半决赛就在<span style="font-size: 36px; font-family: 宋体; color: rgb(49, 133, 155);"><strong>今晚!</strong></span></span></p></section></section></fieldset>
<p style="white-space: normal;"><img  class="profile_avatar lazy" src="/static/imghw/default1.png" data-src="http://mmbiz.qpic.cn/mmbiz/UeZYRwyWLxVbrSdHIQokUcfwqLgHDeHAOIct2NKByo5P7WOGqux1uqDFAfUH922afy36pc8Ge8t8nyNCxKK6Ng/0" data-s="300,640" data-type="jpeg" data- data-ratio="0.726790450928382" data-w="377" alt="正则表达式 - 如何用 php 抓取微信文章正文?" ><br></p>
<p style="white-space: normal;"><br></p>
<fieldset class="tn-Powered-by-XIUMI" style="white-space: normal; border: 0px; margin: 0px; clear: both; box-sizing: border-box; padding: 0px;"><section class="tn-Powered-by-XIUMI" style="padding: 8px; margin: 0px; border-left-width: 6px; border-left-style: solid; border-color: rgb(71, 193, 168); font-size: 1em; line-height: 1.4; text-align: inherit; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: rgb(51, 51, 51); box-sizing: border-box;"><section class="tn-Powered-by-XIUMI" style="box-sizing: border-box;"><p><span style="font-size: 36px;"><strong><span style="font-family: 宋体; color: rgb(49, 133, 155);">今晚六点半</span></strong></span><span style="font-size: 18px;"><strong><span style="font-family: 宋体; color: rgb(49, 133, 155);"></span></strong><span style="font-family: 宋体;">Living Music大赛花都校区的十五强选手将在<span style="font-size: 36px; font-family: 宋体; color: rgb(49, 133, 155);"><strong>实验楼105</strong></span>举行的半决赛当中角逐出进入最终决赛的五名选手,届时将和三水校区进入决赛的五名选手共同组成广工商十强歌手来竞争广工商<span style="font-size: 36px; font-family: 宋体; color: rgb(255, 0, 0);"><strong>最强音的宝座!!</strong></span></span></span></p></section></section></fieldset>
<p style="white-space: normal;"><img  src="/static/imghw/default1.png" data-src="http://mmbiz.qpic.cn/mmbiz/UeZYRwyWLxVicCIE0fvVEsL865N96Ds2cuLr8deLzfyGmmNLd5dKgP4m0FQ57uNewg4tMn2wiadSxhEMqptr1dxQ/0" class="lazy" data-s="300,640" data-type="jpeg" data- data-ratio="0.5964912280701754" data-w="456" alt="正则表达式 - 如何用 php 抓取微信文章正文?" ><br></p>
<fieldset class="tn-Powered-by-XIUMI" style="white-space: normal; border: 0px; margin: 0px; clear: both; box-sizing: border-box; padding: 0px;"><section class="tn-Powered-by-XIUMI" style="padding: 8px; margin: 0px; border-left-width: 6px; border-left-style: solid; border-color: rgb(71, 193, 168); font-size: 1em; line-height: 1.4; text-align: inherit; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: rgb(51, 51, 51); box-sizing: border-box;"><section class="tn-Powered-by-XIUMI" style="box-sizing: border-box;"><span style="font-size: 18px;">广工商最强音的诞生需要你的见证,come on 小伙伴,即使不是最专业的点评家,你也可以是<span style="font-size: 36px; color: rgb(49, 133, 155);"><strong>最专业的聆听者</strong></span><span style="font-size: 36px; color: rgb(49, 133, 155);">!</span></span></section></section></fieldset>
<p style="white-space: normal;"><img  src="/static/imghw/default1.png" data-src="http://mmbiz.qpic.cn/mmbiz/UeZYRwyWLxV1eIfFV9Do2a4aUp0koiadsKydXaDL3d696kOuEpXq5XSbrHk86fnicm6tG8ZPlQI6BsukIMlQmjGg/0" class="lazy" data-s="300,640" data-type="jpeg" data- data-ratio="1.0588235294117647" data-w="289" alt="正则表达式 - 如何用 php 抓取微信文章正文?" ><br></p>
<fieldset class="tn-Powered-by-XIUMI" style="color: inherit; font-family: inherit; font-size: 1em; font-weight: inherit; text-align: inherit; white-space: normal; border: 1px solid rgb(226, 226, 226); box-shadow: rgb(226, 226, 226) 0px 16px 1px -10px; line-height: 1.6; text-decoration: inherit; box-sizing: border-box; padding: 0px; background-color: rgb(255, 255, 255);">
<section class="tn-Powered-by-XIUMI" style="padding: 20px; color: rgb(255, 255, 255); text-align: center; font-weight: bold; line-height: 1.4; box-shadow: rgb(221, 221, 221) 0px 3px 3px; font-size: 1.4em; font-family: inherit; text-decoration: inherit; border-color: rgb(71, 193, 168); box-sizing: border-box; background-color: rgb(71, 193, 168);"><section class="tn-Powered-by-XIUMI" style="box-sizing: border-box;"><strong><span style="font-family: 宋体; font-size: 24px; line-height: 25.2000007629395px;"><span style="line-height: 28px;">Living Music大赛花都校区</span>15进5的半决赛</span></strong></section></section><p style="margin-top: 24px; text-align: inherit; font-size: 1em; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: inherit; border-color: rgb(71, 193, 168); box-sizing: border-box; line-height: 2em; background-color: transparent;"><img  class="tn-Powered-by-XIUMI lazy" src="/static/imghw/default1.png" data-src="http://mmbiz.qpic.cn/mmbiz/MVPvEL7Qg0GPLZlicQq2RYNicbDmd1xQT0Gicv1A0tlNRtyWzrwk4Odopjzzpwqo4YJkUl3x7nMbGeLATIszGPJ2Q/640" data- data-ratio="1" data-w="30"   style="max-width:90%" alt="正则表达式 - 如何用 php 抓取微信文章正文?" > <span style="line-height: 25.6000003814697px; color: inherit; font-family: inherit; font-size: 1em; font-weight: inherit; text-align: inherit; text-decoration: inherit;">4月27日18:30(即今晚)</span></p>
<p style="margin-top: 16px; text-align: inherit; font-size: 1em; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: inherit; border-color: rgb(71, 193, 168); box-sizing: border-box; background-color: transparent;"><img  class="tn-Powered-by-XIUMI lazy" src="/static/imghw/default1.png" data-src="http://mmbiz.qpic.cn/mmbiz/MVPvEL7Qg0GPLZlicQq2RYNicbDmd1xQT0xTVEAtw1fibKcv7QmGPZ2SPibJyDvCcAI1jgWFZxhxb1XSBViae9ibboJg/640" data- data-ratio="1" data-w="30"   style="max-width:90%" alt="正则表达式 - 如何用 php 抓取微信文章正文?" > <span style="line-height: 25.6000003814697px; color: inherit; font-family: inherit; font-size: 1em; font-weight: inherit; text-align: inherit; text-decoration: inherit;">实验楼105</span></p>
<p style="margin-top: 16px; text-align: inherit; font-size: 1em; font-family: inherit; font-weight: inherit; text-decoration: inherit; color: inherit; border-color: rgb(71, 193, 168); box-sizing: border-box; background-color: transparent;"><span style="line-height: 25.6000003814697px; color: inherit; font-family: inherit; font-size: 1em; font-weight: inherit; text-align: inherit; text-decoration: inherit;"><br></span></p>
</fieldset>
<p><br></p>
</div>                    <script type="text/javascript">
                        var first_sceen__time = (+new Date());
                    </script>                    <link rel="stylesheet" type="text/css" href="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/style/page/appmsg/page_mp_article_improve_combo25624b.css">                                                                                                    <div class="rich_media_tool" id="js_toobar">                                                <div id="js_read_area" class="media_tool_meta tips_global meta_primary" style="display:none;">阅读 <span id="readNum"></span>
</div>                        <span style="display:none;" class="media_tool_meta meta_primary tips_global meta_praise" id="like">                            <i class="icon_praise_gray"></i><span class="praise_num" id="likeNum"></span>                        </span>                        <a id="js_report_article" style="display:none;" class="media_tool_meta tips_global meta_extra" href="javascript:void(0);">举报</a>                    </div>                </div>                <div class="rich_media_area_extra">                                        <div class="mpda_bottom_container" id="js_bottom_ad_area"></div>                                        <div id="js_iframetest" style="display:none;"></div>                                                        </div>                           </div>            <div id="js_pc_qr_code" class="qr_code_pc_outer" style="display:none;">                <div class="qr_code_pc_inner">                    <div class="qr_code_pc">                        <img  class="qr_code_pc_img lazy" src="/static/imghw/default1.png" data-src="http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/moon230eaa.js" id="js_pc_qr_code_img" alt="正则表达式 - 如何用 php 抓取微信文章正文?" >                        <p>微信扫一扫<br>关注该公众号</p>                    </div>                </div>            </div>        </div>    </div>                <script>window.moon_map = {"a/gotoappdetail.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/gotoappdetail2562f8.js","a/ios.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/ios24a769.js","a/android.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/android22772d.js","a/profile.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/a/profile24a2ff.js","biz_common/utils/report.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/report224ef3.js","biz_common/utils/cookie.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/cookie224ef3.js","appmsg/reward_entry.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/reward_entry256315.js","appmsg/comment.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/comment255696.js","appmsg/like.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/like2340dc.js","appmsg/a.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/a25624b.js","biz_common/tmpl.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/tmpl224ef3.js","biz_common/ui/imgonepx.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/ui/imgonepx224ef3.js","biz_common/dom/attr.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/attr22f190.js","biz_wap/utils/ajax.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/ajax22589f.js","biz_common/utils/string/html.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/string/html224ef3.js","appmsg/report.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/report23c757.js","biz_common/dom/class.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/class236751.js","appmsg/report_and_source.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/report_and_source23a582.js","appmsg/page_pos.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/page_pos253aa9.js","appmsg/cdn_speed_report.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cdn_speed_report224ef3.js","appmsg/iframe.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/iframe24f185.js","appmsg/review_image.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/review_image2480be.js","appmsg/outer_link.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/outer_link224ef3.js","biz_wap/jsapi/core.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/jsapi/core22589f.js","biz_common/dom/event.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/dom/event24f08a.js","appmsg/async.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/async25624b.js","biz_wap/ui/lazyload_img.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/ui/lazyload_img23354e.js","biz_common/log/jserr.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/log/jserr22589f.js","appmsg/share.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/share251ea5.js","biz_wap/utils/mmversion.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_wap/utils/mmversion224ef3.js","appmsg/cdn_img_lib.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/cdn_img_lib23c757.js","biz_common/utils/url/parse.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/biz_common/utils/url/parse238f07.js","appmsg/index.js":"http://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/appmsg/index2567e4.js"};</script><script type="text/javascript"></script>    <script id="t_cmt" type="text/html">
        <li class="discuss_item" id="cid<# if (is_from_me == 1) { #><#=my_id#><# } else { #><#=content_id#><# } #>">
            <# if(is_elected == 1){ #>


<div class="discuss_opr">
                <span class="media_tool_meta tips_global meta_praise js_comment_praise <# if(like_status == 1){ #>praised<# } #>" data-status="<#=like_status#>" data-content-id='<#=content_id#>'>
                    <i class="icon_praise_gray">
                    <span class="praise_num"><# if(like_num_format !== 0){ #><#=like_num_format#> <# } #>
                
            


            <# } #>
            <div class="user_info">
                <strong class="nickname"><#=nick_name#><# if(is_from_friend == 1){ #>(朋友)<# } #>
                <img  class="avatar lazy"  src="/static/imghw/default1.png"  data-src="<#=logo_url# alt="正则表达式 - 如何用 php 抓取微信文章正文?" >" >
            
            <div class="discuss_message">
                <span class="discuss_status"><#=status#>
                <#=content#>
            
            <p class="discuss_extra_info">
                <#=time#>               
                <# if (is_from_me == 1) { #>
                <a class="discuss_del js_del" href="javascript:;" data-my-id="<#=my_id#>" data-content-id="<#=content_id#>">删除
                <# } #>
            
            <# if(reply && reply.reply_list && reply.rep</script></code>
登录后复制
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

Video Face Swap

Video Face Swap

使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热工具

记事本++7.3.1

记事本++7.3.1

好用且免费的代码编辑器

SublimeText3汉化版

SublimeText3汉化版

中文版,非常好用

禅工作室 13.0.1

禅工作室 13.0.1

功能强大的PHP集成开发环境

Dreamweaver CS6

Dreamweaver CS6

视觉化网页开发工具

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

热门话题

Java教程
1662
14
CakePHP 教程
1418
52
Laravel 教程
1311
25
PHP教程
1261
29
C# 教程
1234
24
PHP和Python:比较两种流行的编程语言 PHP和Python:比较两种流行的编程语言 Apr 14, 2025 am 12:13 AM

PHP和Python各有优势,选择依据项目需求。1.PHP适合web开发,尤其快速开发和维护网站。2.Python适用于数据科学、机器学习和人工智能,语法简洁,适合初学者。

PHP行动:现实世界中的示例和应用程序 PHP行动:现实世界中的示例和应用程序 Apr 14, 2025 am 12:19 AM

PHP在电子商务、内容管理系统和API开发中广泛应用。1)电子商务:用于购物车功能和支付处理。2)内容管理系统:用于动态内容生成和用户管理。3)API开发:用于RESTfulAPI开发和API安全性。通过性能优化和最佳实践,PHP应用的效率和可维护性得以提升。

PHP:网络开发的关键语言 PHP:网络开发的关键语言 Apr 13, 2025 am 12:08 AM

PHP是一种广泛应用于服务器端的脚本语言,特别适合web开发。1.PHP可以嵌入HTML,处理HTTP请求和响应,支持多种数据库。2.PHP用于生成动态网页内容,处理表单数据,访问数据库等,具有强大的社区支持和开源资源。3.PHP是解释型语言,执行过程包括词法分析、语法分析、编译和执行。4.PHP可以与MySQL结合用于用户注册系统等高级应用。5.调试PHP时,可使用error_reporting()和var_dump()等函数。6.优化PHP代码可通过缓存机制、优化数据库查询和使用内置函数。7

PHP与Python:了解差异 PHP与Python:了解差异 Apr 11, 2025 am 12:15 AM

PHP和Python各有优势,选择应基于项目需求。1.PHP适合web开发,语法简单,执行效率高。2.Python适用于数据科学和机器学习,语法简洁,库丰富。

PHP的持久相关性:它还活着吗? PHP的持久相关性:它还活着吗? Apr 14, 2025 am 12:12 AM

PHP仍然具有活力,其在现代编程领域中依然占据重要地位。1)PHP的简单易学和强大社区支持使其在Web开发中广泛应用;2)其灵活性和稳定性使其在处理Web表单、数据库操作和文件处理等方面表现出色;3)PHP不断进化和优化,适用于初学者和经验丰富的开发者。

PHP与其他语言:比较 PHP与其他语言:比较 Apr 13, 2025 am 12:19 AM

PHP适合web开发,特别是在快速开发和处理动态内容方面表现出色,但不擅长数据科学和企业级应用。与Python相比,PHP在web开发中更具优势,但在数据科学领域不如Python;与Java相比,PHP在企业级应用中表现较差,但在web开发中更灵活;与JavaScript相比,PHP在后端开发中更简洁,但在前端开发中不如JavaScript。

PHP和Python:代码示例和比较 PHP和Python:代码示例和比较 Apr 15, 2025 am 12:07 AM

PHP和Python各有优劣,选择取决于项目需求和个人偏好。1.PHP适合快速开发和维护大型Web应用。2.Python在数据科学和机器学习领域占据主导地位。

PHP与Python:核心功能 PHP与Python:核心功能 Apr 13, 2025 am 12:16 AM

PHP和Python各有优势,适合不同场景。1.PHP适用于web开发,提供内置web服务器和丰富函数库。2.Python适合数据科学和机器学习,语法简洁且有强大标准库。选择时应根据项目需求决定。

See all articles