
Mon, 14 April 2025
';
echo 'Bookmark this page for fast access to all sites of the 2WAP group.';
echo '';
////////////////////////////////
echo '';
echo "\n";
echo '

Advertisements
';
echo "\n";
echo '

Download
Xchanger.Mobi - web to wap file share
";
}
}
function iptocountry($ip)
{
//$two_letter_country_code=@getCCfromIP($ip);
require_once "/home/wap2org/php/Net/GeoIP.php";
$geoip = Net_GeoIP::getInstance("/home/wap2org/php/Net/GeoIP/GeoIP.dat");
$two_letter_country_code = $geoip->lookupCountryCode($ip);
if ($two_letter_country_code == "") {
$two_letter_country_code = "unkn";
}
return $two_letter_country_code;
//}else return $db_result['country'];
}
function getIP()
{
$proxy = "";
$IP = "";
if (isSet($_SERVER)) {
if (isSet($_SERVER["HTTP_X_FORWARDED_FOR"])) {
$IP = $_SERVER["HTTP_X_FORWARDED_FOR"];
$proxy = $_SERVER["REMOTE_ADDR"];
} elseif (isSet($_SERVER["HTTP_CLIENT_IP"])) {
$IP = $_SERVER["HTTP_CLIENT_IP"];
}else if(isset($_SERVER["HTTP_X_REAL_IP"])){
$IP = $_SERVER["HTTP_X_REAL_IP"];
} else {
$IP = $_SERVER["REMOTE_ADDR"];
}
} else {
if (getenv('HTTP_X_FORWARDED_FOR')) {
$IP = getenv('HTTP_X_FORWARDED_FOR');
$proxy = getenv('REMOTE_ADDR');
} elseif (getenv('HTTP_CLIENT_IP')) {
$IP = getenv('HTTP_CLIENT_IP');
} else {
$IP = getenv('REMOTE_ADDR');
}
}
if (strstr($IP, ',')) {
$ips = explode(',', $IP);
$IP = $ips[0];
}
//$RemoteInfo[0]=$IP;
//$RemoteInfo[1]=@GetHostByAddr($IP);
//$RemoteInfo[2]=$proxy;
//return $RemoteInfo;
if (empty($IP))
$IP = $_SERVER["REMOTE_ADDR"];
elseif (strtolower(trim($IP)) == 'unknown')
$IP = $_SERVER["REMOTE_ADDR"];
return trim($IP);
}
function getAttribs($t, $a, $s) {
preg_match_all("/(<".$t." .*?".$a.".*?=.*?[\"|'])(.*?)([\"|'].*?>)/", $s, $m);
return $m[2][0];
}
function manlix_russian_time($time)
{
global $manlix_russian_time;
if(!isset($time))
$manlix_russian_time="�� �� ������� ����� ��� ��������� ��� ������";
elseif(!is_numeric($time))
$manlix_russian_time="�� ������� ������������ ����� ��� ��������� ��� ������";
else
{
$months1= array("������","�������","����","������","���","����","����","������","��������","�������","������","�������");
$months2= array("������","�������","�����","������","���","����","����","�������","��������","�������","������","�������");
$months3= array("������","�������","�����","������","���","����","����","�������","��������","�������","������","�������");
$months4= array("� ������","� �������","� �����","� ������","� ���","� ����","� ����","� �������","� ��������","� �������","� ������","� �������");
$months5= array("���","����","����","���","���","����","����","���","���","���","����","���");
$months6= array("���","����","�����","���","���","����","����","���","���","���","����","���");
$months7= array("� ���","� ����","� �����","� ���","� ���","� ����","� ����","� ���","� ���","� ���","� ����","� ���");
if(date('H',$time) >= 0 && date('H',$time)<7) {$day_status = "����"; $day_status2 = "��";}
elseif(date('H',$time) >= 6 && date('H',$time)<13) {$day_status = "����"; $day_status2 = "��";}
elseif(date('H',$time) >= 12 && date('H',$time)< 19) {$day_status = "����"; $day_status2 = "��";}
else {$day_status = "�����"; $day_status2 = "��";}
$days1 = array("�����������","�����������","�������","�����","�������","�������","�������");
$days2 = array("�����������","�����������","�������","�����","�������","�������","�������");
$days3 = array("� �����������","� �����������","�� �������","� �����","� �������"," � �������"," � �������");
$days4 = array("��","��","��","��","��","��","��");
$days5 = array("� ��","� ��","�� ��","� ��","� ��","� ��","� ��");
if (date('w',$time)==0) {$num_day_of_the_week=7;}
else {$num_day_of_the_week=date('w',$time);}
$manlix_russian_time = array(
'year' => date('Y',$time),
'year2' => date('y',$time),
'month' => $months1[date('m',$time) - 1],
'month2' => $months2[date('m',$time) - 1],
'month3' => $months3[date('m',$time) - 1],
'month4' => $months4[date('m',$time) - 1],
'month5' => $months5[date('m',$time) - 1],
'month6' => $months6[date('m',$time) - 1],
'month7' => $months7[date('m',$time) - 1],
'month8' => date('m',$time),
'day_status' => $day_status,
'day_status2' => $day_status2,
'day' => $days1[date('w',$time)],
'day2' => $days2[date('w',$time)],
'day3' => $days3[date('w',$time)],
'day4' => $days4[date('w',$time)],
'day5' => $days5[date('w',$time)],
'day6' => $num_day_of_the_week,
'day7' => date('d',$time),
'day8' => date('z',$time),
'hour' => date('H',$time),
'hour2' => date('h',$time),
'minute' => date('i',$time),
'second' => date('s',$time)
);
return $manlix_russian_time;
}
}
function rus_toutf8($soo){
$soo = str_replace("�","а", $soo);
$soo = str_replace("�","б", $soo);
$soo = str_replace("�","в", $soo);
$soo = str_replace("�","г", $soo);
$soo = str_replace("�","д", $soo);
$soo = str_replace("�","е", $soo);
$soo = str_replace("�","ж", $soo);
$soo = str_replace("�","з", $soo);
$soo = str_replace("�","и", $soo);
$soo = str_replace("�","й", $soo);
$soo = str_replace("�","к", $soo);
$soo = str_replace("�","л", $soo);
$soo = str_replace("�","м", $soo);
$soo = str_replace("�","н", $soo);
$soo = str_replace("�","о", $soo);
$soo = str_replace("�","п", $soo);
$soo = str_replace("�","р", $soo);
$soo = str_replace("�","с", $soo);
$soo = str_replace("�","т", $soo);
$soo = str_replace("�","у", $soo);
$soo = str_replace("�","ф", $soo);
$soo = str_replace("�","х", $soo);
$soo = str_replace("�","ц", $soo);
$soo = str_replace("�","ч", $soo);
$soo = str_replace("�","ш", $soo);
$soo = str_replace("�","щ", $soo);
$soo = str_replace("�","ъ", $soo);
$soo = str_replace("�","ы", $soo);
$soo = str_replace("�","ь", $soo);
$soo = str_replace("�","э", $soo);
$soo = str_replace("�","ю", $soo);
$soo = str_replace("�","я", $soo);
$soo = str_replace("�","А", $soo);
$soo = str_replace("�","Б", $soo);
$soo = str_replace("�","В", $soo);
$soo = str_replace("�","Г", $soo);
$soo = str_replace("�","Д", $soo);
$soo = str_replace("�","Е", $soo);
$soo = str_replace("�","Ж", $soo);
$soo = str_replace("�","З", $soo);
$soo = str_replace("�","И", $soo);
$soo = str_replace("�","Й", $soo);
$soo = str_replace("�","К", $soo);
$soo = str_replace("�","Л", $soo);
$soo = str_replace("�","М", $soo);
$soo = str_replace("�","Н", $soo);
$soo = str_replace("�","О", $soo);
$soo = str_replace("�","П", $soo);
$soo = str_replace("�","Р", $soo);
$soo = str_replace("�","С", $soo);
$soo = str_replace("�","Т", $soo);
$soo = str_replace("�","У", $soo);
$soo = str_replace("�","Ф", $soo);
$soo = str_replace("�","Х", $soo);
$soo = str_replace("�","Ц", $soo);
$soo = str_replace("�","Ч", $soo);
$soo = str_replace("�","Ш", $soo);
$soo = str_replace("�","Щ", $soo);
$soo = str_replace("�","Ъ", $soo);
$soo = str_replace("�","Ы", $soo);
$soo = str_replace("�","Ь", $soo);
$soo = str_replace("�","Э", $soo);
$soo = str_replace("�","Ю", $soo);
$soo = str_replace("�","Я", $soo);
return $soo;
}
function replace2($text)
{
$text = stripslashes($text);
$text = preg_replace('/[^[:space:][:punct:][:alnum:]\@\^]/','',$text);
$text=str_replace("What else happened?","",$text);
$text=str_replace("From The Old Farmer's Almanac.","",$text);
$text=str_replace("\$","*",$text);
return $text;
}
function theRealStripTags($string)
{
//while there are tags left to remove
while(strstr($string, '>'))
{
//find position of first carrot
$currentBeg = strpos($string, '<');
//find position of end carrot
$currentEnd = strpos($string, '>');
//find out if there is string before first carrot
//if so save it in $tmpstring
$tmpStringBeg = @substr($string, 0, $currentBeg);
//find out if there is string after last carrot
//if so save it in $tmpStringEnd
$tmpStringEnd = @substr($string, $currentEnd + 1, strlen($string));
//cut the tag from the string
$string = $tmpStringBeg.$tmpStringEnd;
}
return $string;
}
function unhtmlentities ($string) {
// Get HTML entities table
$trans_tbl = get_html_translation_table (HTML_ENTITIES, ENT_QUOTES);
// Flip keys<==>values
$trans_tbl = array_flip ($trans_tbl);
// Add support for ' entity (missing in HTML_ENTITIES)
$trans_tbl += array(''' => "'");
$trans_tbl += array('<' => "<");
// Replace entities by values
return strtr ($string, $trans_tbl);
}
function ShowOneRSS($url) {
global $rss;
if ($rs = $rss->get($url)) {
//echo $rs['title']."
\n";
//echo $rs['description']."
\n";
$count_items=$rs['items_count'];
$random_update=rand(1,$count_items);
$ii=1;
foreach ($rs['items'] as $item) {
if($ii==$random_update)echo theRealStripTags(unhtmlentities ($item['title'])).'
'.replace2(theRealStripTags(unhtmlentities ($item['description']))).'';
$ii++;
}
if ($rs['items_count'] <= 0) { echo "Sorry, no items found in the RSS file :-("; }
echo "\n";
}
}
?>