<?php
Error_Reporting(E_ALL & ~E_NOTICE);
include("header.php");
$host = "vipfon.ru";
$path = "/catalog/index.php?c=13";
$fp = fsockopen($host,80,$errno,$errstr,30);
if(!$fp) echo"$errstr ($errno)<br />\n";
else{
$headers = "GET $path HTTP/1.0\r\n";
$headers .= "Host: $host\r\n";
$headers .= "Accept: *\r\n";
$headers .="Accept-Charset: UTF-8\r\n";
$headers .= "Accept-Charset: *\r\n";
$headers .= "Accept-Encoding: deflate\r\n";
$headers .= "Accept-Language: ru\r\n";
$headers .= "User-Agent: Nokia6600/1.0\r\n\r\n";
fwrite($fp,$headers);
while($text != "\r\n")
$text = fgets($fp,128);
$text = "";
while(!feof($fp))
$text .= fgets($fp,4096);
fclose($fp);
}
$text=str_replace('<?xml version="1.0" encoding="utf-8"?>','', $text);
$text=str_replace('<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">','', $text);
$text=str_replace('<wml>','', $text);
$text=str_replace('<card title="Ftp">','', $text);
$text=str_replace('<p align="center">','', $text);
$text=str_replace('<a href="http://wapri.wapix.ru/4885/">Звуки и фразы</a><br/>','', $text);
$text=str_replace('<a href="http://erawap.net/out/?id=43">Девочки 18-19лет</a><br/>','', $text);
$text=str_replace('<a href="http://erawap.net/out/?id=43">SEX=100%Бесплатно</a><br/>','', $text);
$text=str_replace('</p>','', $text);
$text=str_replace('<p>','', $text);
$text=str_replace('<p align="left">','', $text);
$text=str_replace('<a href="index.php?k=2">Cофт</a>','<br/>', $text);
$text=str_replace('<a href="http://waplog.net/ru/c.shtml?10164">','', $text);
$text=str_replace('<img src="http://c.waplog.net/ru/10164.cnt" alt="waplog" /></a>','', $text);
$text=str_replace('</card>','', $text);
$text=str_replace('</wml>','', $text);
$text=str_replace('<small>','', $text);
$text=str_replace('</small>','', $text);
$text=str_replace('<a href="http://vipfon.ru">VipFon.ru</a>','<a href="http://lameru.net.ru">Lamerov Net</a>', $text);
print "$text";
include("footer.php");
?>