php preg_match def out _SERVER REQUEST_URI decoded base64_decode str_r

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
preg_match('/('.$def['out'].')(.+?)\//i', $_SERVER['REQUEST_URI'], $m);
$decoded = '/'.base64_decode( str_replace( '-', '=', $m[2] ) );
preg_match('/\/(partner)\/([0-9]+)\//i', $decoded, $m);
$partner = $m[2];
preg_match('/\/(subaccount)\/(.+?)\//i', $decoded, $m);
$subaccount = $m[2];
if (preg_match('/(download)/i', $decoded, $m)) {
if (preg_match('/\/(album)\/([0-9]+)\/(pk_song)\/([0-9]+)\//i', $decoded, $m))
out("user/auth/?backward=%2Falbum".$m[2]."%2F".(($m[4]) ? "&pk_song=".$m[4] : "").'&partner='.$partner. (($subaccount) ? "&subaccount=$subaccount":""));
if (preg_match('/\/(album)\/([0-9]+)\//i', $decoded, $m))
out("user/auth/?backward=%2Falbum".$m[2]."%2F".'&partner='.$partner. (($subaccount) ? "&subaccount=$subaccount":""));
}
if (preg_match('/\/(bottom)\/([a-z]+)\//i', $decoded, $m)) {
#echo "publication/".$m[2].'.html?partner='.$partner. (($subaccount) ? "&subaccount=$subaccount":""); die;
out("publication/".$m[2].'.html?partner='.$partner. (($subaccount) ? "&subaccount=$subaccount":""));
}
/**************************************************************/
function out($loc) {
$fiesta = "http://www.mp3fiesta.com/";
header("Location:".$fiesta.$loc);
die();
}
/**************************************************************/
?>