Просмотр файла index.php

Размер файла: 1.59Kb
  1. <?
  2. $query = (isset($_SERVER['QUERY_STRING'])) ? 'http://pisi.su'.$_SERVER['QUERY_STRING'] : 'http://pisi.su';
  3. $ch = curl_init($query);
  4. curl_setopt ($ch, CURLOPT_USERAGENT, "Nоkiа5530XprеssMusic/GoBrowser/1.6.0.48");
  5. curl_setopt($ch, CURLOPT_POST, 1);
  6. curl_setopt($ch, CURLOPT_POSTFIELDS, '');
  7. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  8. $result = curl_exec($ch);
  9. $result = str_replace(array(chr(13),chr(10)),'',$result);
  10. curl_close($ch);
  11. $result = str_replace('<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd"><html xmlns="http://www.w3.org/1999/xhtml">','',$result);
  12. $result = preg_replace("~<head>(.*)<\/head>~siU","",$result);
  13. $result = preg_replace("~<div class=\"logo\">(.*)<\/div>~siU","",$result);
  14. $result = preg_replace("~<!--TEASER BLOCK START-->(.*)<!--TEASER LOADER END-->~siU","",$result);
  15. $result = preg_replace("~<div class=\"search\">(.*)<\/div>~siU","",$result);
  16. $result = preg_replace("~<div class=\"block\"><a href=\"/search\.html\">(.*)<\/a><\/div>~siU","",$result);
  17. $result = preg_replace("~<div class=\"ads\">(.*)<\/div><\/div>~siU","",$result);
  18. $result = preg_replace("~<div class=\"banner\">(.*)<\/body>~siU","</body>",$result);
  19. $result = preg_replace("~\/get\/(.*)~siU","http://pisi.su/get/$1",$result);
  20. $result = str_replace('href="','href="?',$result);
  21. $result = str_replace("href='","href='?",$result);
  22. $result = str_replace('href="?http:','href="http:',$result);
  23. $result = str_replace('<img src="','<img src="http://pisi.su',$result);
  24. include 'head.php';
  25. echo $result;
  26. include 'foot.php';
  27. ?>