Нужно вытащить последнее сообщение, здесь (MSG):
http://vk.com/ololololololololoolololololololl
Так не получается:
http://vk.com/ololololololololoolololololololl
Код:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="shortcut icon" href="/images/faviconnew.ico" />
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<meta name="description" content=" " />
<title></title>
<noscript><meta http-equiv="refresh" content="0; URL=/badbrowser.php"></noscript>
<script type="text/javascript">
var vk = {
ad: 1,
adupd: 120000, // 2 min
al: parseInt('4') || 4,
id: 0,
intnat: '' ? true : false,
host: 'vk.com',
lang: 0,
rtl: parseInt('') || 0,
version: 8427,
stDomains: 3,
zero: false,
contlen: 12497,
loginscheme: 'https',
ip_h: 'e302074596b81b5dbc',
vc_h: '311879b6875b39e7c299165bd0151323',
navPrefix: '/',
dt: parseInt('') || 0,
fs: parseInt('11') || 11,
time: [2012, 3, 20, 15, 41]
}
window.locDomain = vk.host.match(/[a-zA-Z]+\.[a-zA-Z]+\.?$/)[0];
var _ua = navigator.userAgent.toLowerCase();
if (/opera/i.test(_ua) || !/msie 6/i.test(_ua) || document.domain != locDomain) document.domain = locDomain;
var ___htest = (location.toString().match(/#(.*)/) || {})[1] || '';
if (vk.al != 1 && ___htest.length && ___htest.substr(0, 1) == vk.navPrefix) {
if (vk.al != 3 || vk.navPrefix != '!') {
location.replace(location.protocol + '//' + location.host + '/' + ___htest.replace(/^(\/|!)/, ''));
}
}
var StaticFiles = {
'common.js' : {v: 770},
'common.css': {v: 289},
'ie6.css' : {v: 22},
'ie7.css' : {v: 16}
,'lang0_0.js':{v:6143},'wk.css':{v:20},'groups.css':{v:61},'page.css':{v:307}
}
</script>
<link rel="stylesheet" type="text/css" href="http://st0.userapi.com/css/al/common.css?289" />
<!--[if lte IE 6]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(http://st0.userapi.com/css/al/ie6.css?22); /* ]]> */</style><![endif]-->
<!--[if IE 7]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(http://st0.userapi.com/css/al/ie7.css?16); /* ]]> */</style><![endif]-->
<link type="text/css" rel="stylesheet" href="http://st0.userapi.com/css/al/wk.css?20"></link><link type="text/css" rel="stylesheet" href="http://st0.userapi.com/css/al/groups.css?61"></link><link type="text/css" rel="stylesheet" href="http://st0.userapi.com/css/al/page.css?307"></link><script type="text/javascript" src="/js/loader_nav8427_0.js"></script><script type="text/javascript" src="http://st1.userapi.com/js/al/common.js?770"></script><script type="text/javascript" src="/js/lang0_0.js?6143"></script>
</head>
<body onresize="onBodyResize()" class="is_rtl font_default">
<div id="system_msg" class="fixed"></div>
<div id="utils"></div>
<div id="layer_bg" class="fixed"></div><div id="layer_wrap" class="scroll_fix_wrap fixed"><div id="layer"></div></div>
<div id="box_layer_bg" class="fixed"></div><div id="box_layer_wrap" class="scroll_fix_wrap fixed"><div id="box_layer"><div id="box_loader"><div class="loader"></div><div class="back"></div></div></div></div>
<div id="stl_left"></div><div id="stl_side"></div>
<script type="text/javascript">domStarted();</script>
<div class="scroll_fix_wrap" id="page_wrap">
<div><div class="scroll_fix">
<div id="page_layout" style="width: 791px;">
<div id="page_header" class="p_head p_head_l0">
<div class="back"></div>
<div class="left"></div>
<div class="right"></div>
<div class="content">
<div id="top_nav" class="head_nav">
<div id="top_logo_down" class="fl_l"></div>
<a id="top_home_link" class="top_home_link fl_l" href="/" onmousedown="addClass('top_logo_down','tld_d');" onclick="return nav.go(this, event);" onmouseup="removeClass('top_logo_down','tld_d');" style=""></a>
<div id="top_links">
<div class="fl_r" id="top_menu_wrap" style="">
<a id="top_reg_link" class="fl_r top_nav_link" href="/join" style="" onclick="return !showBox('join.php', {act: 'box', from: nav.strLoc}, {}, event)">регистрация</a>
</div>
<a class="fl_l top_nav_link" href="" id="top_back_link" onclick="return nav.go(this, event, {back: true})"></a>
</div>
</div>
</div>
</div>
<div id="side_bar" class="fl_l" style="">
<div id="quick_login">
<form method="POST" name="login" id="quick_login_form" action="https://login.vk.com/?act=login" onsubmit="if (vklogin) {return true} else {quick_login();return false;}">
<input type="hidden" name="act" value="login" />
<input type="hidden" name="q" value="1" />
<input type="hidden" name="al_frame" value="1" />
<input type="hidden" name="expire" id="quick_expire_input" value="" />
<input type="hidden" name="captcha_sid" id="quick_captcha_sid" value="" />
<input type="hidden" name="captcha_key" id="quick_captcha_key" value="" />
<input type="hidden" name="from_host" value="vk.com" />
<input type="hidden" name="from_protocol" value="http" />
<input type="hidden" name="ip_h" value="e302074596b81b5dbc" />
<div class="label">Телефон или e-mail:</div>
<div class="labeled"><input type="text" name="email" class="text" onfocus="show('quick_expire')" id="quick_email" /></div>
<div class="label">Пароль:</div>
<div class="labeled"><input type="password" name="pass" class="text" onfocus="show('quick_expire')" id="quick_pass" /></div>
<div class="checkbox" id="quick_expire" onclick="checkbox(this);ge('quick_expire_input').value=isChecked(this)?1:'';"><div></div>Чужой компьютер</div>
<input type="submit" class="submit" />
</form>
<div class="button_blue button_wide"><button id="quick_login_button">Войти</button></div>
<div class="button_blue button_wide" id="quick_reg_button" style=""><button onclick="top.showBox('join.php', {act: 'box', from: nav.strLoc})">Регистрация</button></div>
<div class="clear forgot"><a href="/restore" target="_top">Забыли пароль?</a></div>
</div>
</div>
<div id="page_body" class="fl_r" style="width: 631px;">
<div id="header_wrap2">
<div id="header_wrap1">
<div id="header" style="">
<h1 id="title">Открытая группа</h1>
</div>
</div>
</div>
<div id="wrap_between"></div>
<div id="wrap3"><div id="wrap2">
<div id="wrap1">
<div id="content"><div id="group">
<div class="narrow_column fl_r" id="group_narrow">
<div id="group_avatar" class="group_avatar">
<img src="http://cs5825.userapi.com/g32660195/a_1c2afa09.jpg" />
</div><div id="page_actions" class="page_actions" style="display: none">
</div><div class="module clear people_module" id="group_followers">
<a href="/search?c[section]=people&c[group]=32660195" onclick="return page.showPageMembers(event, -32660195, 'members')" class="module_header">
<div class="header_top clear_fix">
<span class="right_link fl_r" onmouseover="this.parentNode.parentNode.href=''" onmouseout="this.parentNode.parentNode.href='/search?c[section]=people&c[group]=32660195'"></span>
Участники
</div>
<div class="p_header_bottom">
<span class="fl_r"></span>
3 человека
</div>
</a>
<div class="module_body clear_fix">
<div class="people_row">
<div class="fl_l people_cell">
<a class="ava" href="/id100000000000000000000000o_o" onclick="return nav.go(this, event, {cl_id: 0})">
<img width="50" height="50" src="http://cs9952.userapi.com/u40924957/e_46b77586.jpg"/>
</a>
<div class="name_field">
<a href="/id100000000000000000000000o_o" onclick="return nav.go(this, event)">
Даниил
<small></small>
</a>
</div>
</div><div class="fl_l people_cell">
<a class="ava" href="/id28902813" onclick="return nav.go(this, event, {cl_id: 0})">
<img width="50" height="50" src="http://vk.com/images/deactivated_c.gif"/>
</a>
<div class="name_field">
<a href="/id28902813" onclick="return nav.go(this, event)">
Оксана
<small></small>
</a>
</div>
</div><div class="fl_l people_cell">
<a class="ava" href="/id31133898" onclick="return nav.go(this, event, {cl_id: 0})">
<img width="50" height="50" src="http://vk.com/images/deactivated_c.gif"/>
</a>
<div class="name_field">
<a href="/id31133898" onclick="return nav.go(this, event)">
Владимер
<small></small>
</a>
</div>
</div>
</div>
</div>
</div><div id="group_narrow_topics"></div><div class="module clear page_list_module" id="group_leaders">
<a href="" onclick="if (!checkEvent(event)) {Groups.showLeaders();return false;}" class="module_header">
<div class="header_top clear_fix">
<span class="right_link fl_r" onmouseover="this.parentNode.parentNode.href=''" onmouseout="this.parentNode.parentNode.href=''"></span>
Руководство
</div>
<div class="p_header_bottom">
<span class="fl_r"></span>
1 руководитель
</div>
</a>
<div class="module_body clear_fix">
<a href="/id100000000000000000000000o_o" class="line_cell clear_fix" onclick="return nav.go(this, event)">
<div class="fl_l thumb">
<img src="http://cs9952.userapi.com/u40924957/e_46b77586.jpg" />
</div>
<div class="fl_l info">
Даниил Дейкин
</div>
</a>
</div>
</div>
</div>
<div class="wide_column fl_l" id="group_wide">
<h4 class="simple">
<div class="top_header"></div>
</h4>
<div class="group_info"><div class="clear_fix ">
<div class="label fl_l">Местоположение:</div>
<div class="labeled fl_l">Россия</div>
</div></div><div class="group_wiki_wrap">
<a class="group_wiki_hider" href="/pages?oid=-32660195&p=%D0%A1%D0%B2%D0%B5%D0%B6%D0%B8%D0%B5%20%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8" onclick="if (checkEvent(event)) return; toggle(this.nextSibling); return false;">
Свежие новости
</a><div class="wk_text" style=""><!--4--><a href="/photo40924957_255340322"> </a></div>
</div><div id="group_wide_topics"></div><div class="wall_module" id="group_wall">
<div class="module_header wall_header">
<a id="page_wall_header" class="header_top clear_fix">
<span class="right_link fl_r" id="page_wall_switch" onclick="if (checkEvent(event)) return true; return wall.switchWall(event);"></span>
<b id="page_wall_posts_count">2 записи</b>
</a>
</div>
<div class="clear_fix"><div id="page_wall_posts" class="wall_posts all"><input type="hidden" id="page_wall_count_all" value="2" /><input type="hidden" id="page_wall_count_own" value="0" /><div id="post-32660195_4" class="post all post_online" onmouseover="wall.postOver('-32660195_4')" onmouseout="wall.postOut('-32660195_4')" onclick="wall.postClick('-32660195_4', event)">
<div class="post_table">
<div class="post_image">
<a class="post_image" href="/id100000000000000000000000o_o"><img src="http://cs9952.userapi.com/u40924957/e_46b77586.jpg" width="50" height="50"/></a>
<span class="online">Online</span>
</div>
<div class="post_info">
<div class="fl_r delete_post_wrap">
<div class="delete_post">
<div id="delete_post-32660195_4" onclick="wall.markAsSpam('-32660195_4', 'd307040c45743b279e');" onmouseover="wall.activeDeletePost('-32660195_4', 'Отметить как спам')" onmouseout="wall.deactiveDeletePost('-32660195_4')"></div>
</div>
</div>
olo</div></div></div>
<div class="post_like_wrap fl_r" onmouseover="wall.postLikeOver('-32660195_4')" onmouseout="wall.postLikeOut('-32660195_4')" onclick="wall.like('-32660195_4', '1ca1a089def186789f'); event.cancelBubble = true;">
<div class="post_like">
<span class="post_like_link fl_l" id="like_link-32660195_4"></span>
<i class="post_like_icon no_likes fl_l" id="like_icon-32660195_4"></i>
<span class="post_like_count fl_l" id="like_count-32660195_4"></span>
</div>
</div>
<div class="replies"><div class="reply_link_wrap" id="wpe_bottom-32660195_4">
<small><a href="/wall-32660195_4" onclick="return nav.go(this, event)"><span class="rel_date rel_date_needs_update" abs_time="сегодня в 14:28" time="1332239280">час назад</span></a></small>
</div>
<div class="replies_wrap clear" id="replies_wrap-32660195_4" style="display: none">
<div id="replies-32660195_4"><input type="hidden" id="start_reply-32660195_4" value=""/></div>
</div></div>
</div>
</div>
</div><div id="post-32660195_3" class="post all post_online" onmouseover="wall.postOver('-32660195_3')" onmouseout="wall.postOut('-32660195_3')" onclick="wall.postClick('-32660195_3', event)">
<div class="post_table">
<div class="post_image">
<a class="post_image" href="/id100000000000000000000000o_o"><img src="http://cs9952.userapi.com/u40924957/e_46b77586.jpg" width="50" height="50"/></a>
<span class="online">Online</span>
</div>
<div class="post_info">
<div class="fl_r delete_post_wrap">
<div class="delete_post">
<div id="delete_post-32660195_3" onclick="wall.markAsSpam('-32660195_3', 'd9c82b8cdea1f4263d');" onmouseover="wall.activeDeletePost('-32660195_3', 'Отметить как спам')" onmouseout="wall.deactiveDeletePost('-32660195_3')"></div>
</div>
</div>
<div class="wall_text"><a class="author" href="/id100000000000000000000000o_o" onclick="return nav.go(this, event)">Даниил Дейкин</a> <div id="wpt-32660195_3"><div class="wall_post_text">TEST</div></div></div>
<div class="post_like_wrap fl_r" onmouseover="wall.postLikeOver('-32660195_3')" onmouseout="wall.postLikeOut('-32660195_3')" onclick="wall.like('-32660195_3', 'b14651a5bdaf9a9848'); event.cancelBubble = true;">
<div class="post_like">
<span class="post_like_link fl_l" id="like_link-32660195_3"></span>
<i class="post_like_icon no_likes fl_l" id="like_icon-32660195_3"></i>
<span class="post_like_count fl_l" id="like_count-32660195_3"></span>
</div>
</div>
<div class="replies"><div class="reply_link_wrap" id="wpe_bottom-32660195_3">
<small><a href="/wall-32660195_3" onclick="return nav.go(this, event)"><span class="rel_date rel_date_needs_update" abs_time="сегодня в 14:27" time="1332239276">час назад</span></a></small>
</div>
<div class="replies_wrap clear" id="replies_wrap-32660195_3" style="display: none">
<div id="replies-32660195_3"><input type="hidden" id="start_reply-32660195_3" value=""/></div>
</div></div>
</div>
</div>
</div></div><a class="more_link clear" id="wall_more_link" onclick="wall.showMore(10);"><div class="progress" id="wall_more_progress"></div><div>к предыдущим записям</div></a></div>
</div>
</div>
<br class="clear" />
</div></div>
</div>
</div></div>
</div>
<div id="footer_wrap" class="fl_r" style="width: 661px;">
<div id="bottom_nav">
<a href="/help.php?page=about">о сайте</a>
<a href="/support?act=new" onclick="return nav.go(this, event);" style="">помощь</a>
<a href="/blog">блог</a>
<a href="/help.php?page=terms">правила</a>
<a href="/ads">реклама</a>
<a href="/developers.php">разработчикам</a>
<a href="/jobs.php" style="">вакансии</a>
</div>
<div id="footer" class="clear">
<div class="copy_lang"><a href="/help.php?page=about">ВКонтакте</a> © 2006-2012 <a onclick="ajax.post('al_index.php', {act: 'change_lang', lang_id: 3, hash: '07fa25df3feab4c422'})">English</a><a onclick="ajax.post('al_index.php', {act: 'change_lang', lang_id: 0, hash: '07fa25df3feab4c422'})">Русский</a><a onclick="ajax.post('al_index.php', {act: 'change_lang', lang_id: 1, hash: '07fa25df3feab4c422'})">Українська</a><a onclick="showBox('lang.php', {act: 'lang_dialog'}, {noreload: true})">все языки »</a></div>
<div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div></div></div>
<div class="progress" id="global_prg">
<script type="text/javascript">
if (parent && parent != window && (browser.msie || browser.opera || browser.mozilla || browser.chrome || browser.safari || browser.iphone)) {
document.getElementsByTagName('body')[0].innerHTML = '';
} else {
domReady();
updateMoney(0);
gSearch.init();
if (window.qArr && qArr[5]) qArr[5] = [5, "по товарам", "", "goods", 0x00000100];
if (browser.iphone || browser.ipad || browser.ipod) {
setStyle(bodyNode, {webkitTextSizeAdjust: 'none'});
}var qf = ge('quick_login_form'), ql = ge('quick_login'), qe = ge('quick_email'), qp = ge('quick_pass');
var qlb = ge('quick_login_button'), prgBtn = qlb;
var qinit = function() {
setTimeout(function() {
ql.insertBefore(ce('div', {innerHTML: '<iframe class="upload_frame" id="quick_login_frame" name="quick_login_frame"></iframe>'}), qf);
qf.target = 'quick_login_frame';
}, 1);
}
if (window.top && window.top != window) {
window.onload = qinit;
} else {
setTimeout(qinit, 0);
}
qf.onsubmit = function() {
if (!ge('quick_login_frame')) return false;
if (!trim(qe.value)) {
elfocus(qe);
return false;
} else if (!trim(qp.value)) {
elfocus(qp);
return false;
}
lockButton(window.__qfBtn = prgBtn);
prgBtn = qlb;
return true;
}
window.focusLoginInput = function() {
scrollToTop(0);
notaBene('quick_email');
}
window.changeQuickRegButton = function(noShow) {
if (noShow) {
hide('top_reg_link', 'quick_reg_button');
show('top_search_link');
} else {
hide('top_search_link');
show('top_reg_link', 'quick_reg_button');
}
}
window.submitQuickLoginForm = function(email, pass, opts) {
setQuickLoginData(email, pass, opts);
if (opts && opts.prg) prgBtn = opts.prg;
if (qf.onsubmit()) qf.submit();
}
window.setQuickLoginData = function(email, pass, opts) {
if (email !== undefined) ge('quick_email').value = email;
if (pass !== undefined) ge('quick_pass').value = pass;
var params = opts && opts.params || {};
for (var i in params) {
var el = ge('quick_login_' + i);
if (el) {
val(el, params[i]);
} else {
qf.appendChild(ce('input', {type: 'hidden', name: i, id: 'quick_login_' + i, value: params[i]}));
}
}
}
if (qlb) {
qlb.onclick = function() { if (qf.onsubmit()) qf.submit(); };
}
if (browser.opera_mobile) show('quick_expire');
if (1) {
hide('support_link_td');
}
var ts_input = ge('ts_input'), oldFF = browser.mozilla && parseInt(browser.version) < 8;
if (browser.mozilla && !oldFF) {
setStyle(ts_input, {padding: (vk.rtl ? '3px 22px 4px 4px' : '3px 4px 4px 22px')});
}
placeholderSetup(ts_input, {back: false, reload: true});
if (browser.opera || browser.msie || oldFF) {
setStyle(ts_input, {padding: (vk.rtl ? '3px 22px 4px 4px' : '3px 4px 4px 22px')});
}
if (browser.chrome) {
setStyle(ts_input, {padding: (vk.rtl ? '4px 23px 3px 2px' : '4px 3px 3px 23px')});
}
TopSearch.init();
if (browser.msie8 || browser.msie7) {
var st = {border: '1px solid #a6b6c6'};
if (hasClass(ge('ts_wrap'), 'vk')) {
if (vk.rtl) st.left = '1px';
else st.right = '0px';
} else {
if (vk.rtl) st.right = '146px';
else st.left = '146px';
}
setStyle(ge('ts_cont_wrap'), st);
}
window.tsHintsEnabled = 1;
zNav([], {});
handlePageParams({"id":0,"level":2,"loc":"?gid=32660195&subdir=ololololololololoolololololololl","width":791,"width_dec":160,"width_dec_footer":130});addEvent(document, 'click', onDocumentClick);;stManager.add(["wk.js","groups.js","page.js"], function () {cur.lang = extend(cur.lang || {}, {
group_leave: 'Покинуть группу',
group_confirm_mem: 'Это закрытая группа. Если Вы из нее выйдете, попасть обратно, возможно, будет непросто. Выйти из группы?',
group_confirm_adm: 'Вы – администратор группы. Покинув её, Вы лишитесь административных прав. Выйти из группы?',
sure_delete_photo: 'Вы уверены, что хотите удалить фотографию?',
create_poll: 'Опрос',
change_current_info: 'изменить статус',
share_current_info: 'Рассказать подписчикам сообщества',
dont_attach: 'Не прикреплять'
});
Groups.init({"group_id":32660195,"loc":"ololololololololoolololololololl","back":"","only_official":false,"reply_names":[],"max_post_len":280,"post_hash":"09ce25e89b8ef5f5d3","media_types":false,"wall_type":"all","wall_no":"Нет записей","wall_counts":["","%s запись","%s записи","%s записей"],"all_link":"к записям от имени сообщества","own_link":"ко всем записям","share":{"url":false,"hash":false,"rhash":false}});
});;if (browser.msie) stManager.add('pinbar.js', function() {window.initPinBar('/id', '/im');});
}
</script>
</body>
</html>
Код:
StringRegExpReplace($sData, '.*<div class="wall_post_text">((?s).*)</div>.*', '\1')