<?php
function clear_tags($s){
$s=preg_replace('/\<.+\>(.+)/','$1',$s);
return preg_replace('/(.+)\<.+/','$1',$s);
}
$s=<<<t
<div class="audio_title_wrap"><a href="/search?c[q]=%D0%97%D0%BD%D0%B0%D0%BA%D0%B8&c[section]=audio&c[performer]=1" onmouseover="setTitle(this)" nodrag="1" onclick="return audioSearchPerformer(this, event)" class="audio_performer">Знаки</a><span class="audio_info_divider">–</span><span class="audio_title _audio_title" onmouseover="setTitle(this, domPN(this))"><span class="audio_title_inner" tabindex="0" nodrag="1" aria-label="Один Человек" onclick="return toggleAudioLyrics(event, this, '7576740_421989543', '298903473')">Один Человек</span>
t;
if (preg_match("/>([^>]+?)<\/a>/usi",$s,$matches)) {
$match=$matches[1];
echo $match.' - '.clear_tags($s); // Знаки - Один Человек
}
?>
<?php
//yandex http-notification
$secret='XXXXXXXXXXXXXXXXXXXXXXX';
if ($_POST) {
$params='notification_type&operation_id&amount¤cy&datetime&sender&codepro';
$params=explode('&',$params);
$forHASH=array();
foreach($params as $key=>$p) {
if (isset($_POST[$p])) array_push($forHASH,$_POST[$p]);
}
if ($secret!="") array_push($forHASH,$secret);
if (isset($_POST['label'])) array_push($forHASH,$_POST['label']);
$forHASH=implode('&',$forHASH);
if ($_POST['sha1_hash']===sha1($forHASH) && $_POST['codepro']!=='true') { //transact ok.
////////////////////////////////
/////// Платёж прошел /////////
////////////////////////////////
$status="Успешно!";
$id=$_POST['label'];
$money=$_POST['amount'];
$tranid=$_POST["operation_id"];
$flow="in";
$paysystem="ym";
$ymfrom=$_POST['sender'];
/*что-то делаем....*/
////////////////////////////////
}
}