3 and $secret!=substr($_SERVER['REQUEST_URI'],-(strlen($secret)+strlen($ends)),strlen($secret)) and !eregi(".rss",$_SERVER['REQUEST_URI'])) { header('HTTP/1.0 404 Not Found');exit; } $t=$_REQUEST['t']; $b=$_REQUEST['b']; $u=$_REQUEST['u']; if($_REQUEST['ping']=='123') { $f=file('info/ping.txt'); foreach($f as $k) { $host = 'www.trynt.com'; $path = '/ping-api/v1/'; $vars ="url=http://".$_SERVER['HTTP_HOST']."/".str_replace(" ","-",trim($k)).".rss&title=".trim($k); $e=""; $header = "POST $path HTTP/1.1\r\n"; $header.= "Host: $host\r\n"; $header .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: ".strlen($vars)."\r\n"; $header .= "Connection: close\r\n\r\n"; $fp = pfsockopen($host,80, $errno, $errstr,400); if (!$fp) { echo "$errstr ($errno)
\n"; echo $fp; } else { echo "
".$header."
"; # fputs($fp, "POST $path HTTP/1.1\r\n"); fputs($fp, $header.$vars); fwrite($fp, $out); while (!feof($fp)) { $e.= fgets($fp, 128); } fclose($fp); echo $e."
"; } } exit; } ####### RSS if($_REQUEST['rss']) { $key=$_REQUEST['rss']; $key1=ucwords(str_replace("-"," ",$key)); $key2=str_replace("-","",$key); #print_r($ou); header("HTTP/1.1 200"); header("Content-type:text/xml; charset=UTF-8"); header('Last-Modified: '.date('r', time()-60*60*24+rand(0, 60*60*5))); $v=$rr[0]; $day=60*60*24; $store=1; $store1=10; $last=gmdate("D, d M Y H:i:s",floor(time()/$day/$store)*$day*$store)." GMT"; if(!file_exists("rss/$key2")) { $c=@file_get_contents("http://news.search.yahoo.com/usns/ynsearch/categories/news_story_search_rss/index.html?p=".str_replace("-","+",$key2)); #preg_match_all('/\<!\[CDATA\[(.*?)\]\]><\/title>/mis', $c,$s[1]); preg_match_all('/<description>\<!\[CDATA\[(.*?)\]\]><\/description>/mis', $c,$s[2]); #preg_match_all('/<link>(.*?)http%3A\/\/([^\<].*?)<\/link>/mis', $c,$s[3]); $s[2][1][0]=''; $di=implode("",$s[2][1]); $rsss.="<"."?xml version='1.0' encoding='UTF-8' ?"."> <rss version='2.0'> <channel> "; $rsss.="<title>Hot News : $key1 http://".$_SERVER['HTTP_HOST']." http://".$_SERVER['HTTP_HOST']."/pic/$key-0.jpg http://".$_SERVER['HTTP_HOST']." $key1 $last "; $rsss.=" <![CDATA[$key1]]> http://".$_SERVER['HTTP_HOST']."/$key.aspx $last http://".$_SERVER['HTTP_HOST']."/$key.aspx "; $rsss.=" "; file_put_contents("rss/$key2",$rsss); $fr=fopen("rss/$key2","w+"); fwrite($fr,$rsss); fclose($fr); } $rss=file_get_contents("rss/$key2",$rsss); echo $rss; exit; } //////////// $dell=array("redirect/",$secret); $k=str_replace($dell,"",strip_tags($_REQUEST['qsx'])); if(!$k) { $k=$startkey; } $tmp=file_get_contents($mydiz); if(ereg("",$tmp)) c1(1); if($k)c2($k); function c1($k) { global $gog,$secret,$secret,$ends,$tmp; @preg_match("/<\!--#hot1=(.*?)#-->/",$tmp,$rel1); @preg_match("/<\!--#hot2=(.*?)#-->/",$tmp,$rel2); #print_r($rel1); #print_r($rel2); $rel1=$rel1[1]; $rel2=$rel2[1]; $filename = 'info/'.date('Y-m-d').'.txt'; $new=1; ///// Time in HOUR for update HOT-TRENDS !!!!!!!!!!!!!!!! if (!file_exists($filename) or time() > @filemtime($filename) + 60*60*$new) { $c=@file_get_contents("http://www.google.com/trends/hottrends/atom/hourly"); preg_match_all('/=X">(.*?)\".ucwords($gt)."".$rel2; } } function c2($k) { global $gog1,$gog2,$tmp,$li,$secret,$ends; @preg_match("/<\!--#rel1=(.*?)#-->/",$tmp,$rel1); @preg_match("/<\!--#rel2=(.*?)#-->/",$tmp,$rel2); #print_r($rel1); #print_r($rel2); $rel1=$rel1[1]; $rel2=$rel2[1]; if(!file_exists("rel/$k")) { $c=@file_get_contents("http://www.google.com/complete/search?hl=en&gl=us&json=true&q=".str_replace("-","+",$k).""); $c.=@file_get_contents("http://sugg.search.yahoo.com/gossip-us-fp/?command=".str_replace("-","+",$k).""); preg_match_all('/\"(.*?)\"/', $c,$s); $s[1]=str_replace("\\u0026","and",$s[1]); $s[1]=str_replace("\\u0027","",$s[1]); $s[1]=@array_unique($s[1]); $gog1.=l($s[1],0); $up=fopen("rel/$k","w+"); fwrite($up,$gog1); fclose($up); } $gog111=file("rel/$k"); $gog1=''; foreach($gog111 as $ggg) { $gog1.=$rel1."".ucwords($ggg)."".$rel2; } if(!file_exists("ya/$k")) { $tudey = date("F j Y, g:i a"); $c=@file_get_contents("http://gdata.youtube.com/feeds/api/videos?vq=".urlencode(str_replace(" ","+",$k))."&max-results=5"); preg_match_all('/(.*?)<\/media:title>/mis', $c,$s[1]); preg_match_all('/(.*?)<\/content>/mis', $c,$s[2]); preg_match_all('/

'.($s[1][1][0]).'
'.($s[2][1][0]).'
'; } $li.='


'; $c=@file_get_contents("http://boss.yahooapis.com/ysearch/web/v1/".urlencode(str_replace(" ","+",$k))."?sites=ezinearticles.com,articlesbase.com,answers.yahoo.com,nytimes.com,topix.com,huffingtonpost.com,findarticles.com,hubpages.com&abstract=long&count=6&format=xml&appid=CCDRscvV34EhZiczc7MRLMjxVBpAznQAGj3GxPNMCDQHFG3hyXHgdTf..68BApAKvA0-"); $delet=array("","","","","<h1>","</h1>","<p>","<strong>","</strong>","</p>"); $c=html_entity_decode(str_replace($delet,"",$c)); preg_match_all('/(.*?)<\/title>/mis', $c,$s[1]); preg_match_all('/<abstract>(.*?)<\/abstract>/mis', $c,$s[2]); preg_match_all('/<url>http:\/\/([^\<].*?)<\/url>/mis', $c,$s[3]); preg_match_all('/<date>(.*?)<\/date>/mis', $c,$s[4]); #print_r($s); for($i=0;$i<count($s[3][1]);$i++) { $url=@explode("//",$s[3][1][$i]); $url=$url[count($url)-1]; $shurl = substr($url, 0, strpos($url, '/', 9)+1); $li.=' <span class=adslink>'.($s[1][1][$i]).'</span><br> <span class=adsdescription>'.($s[4][1][$i]).'</span> •  <a class=adsurl href="/?web='.base64_encode($url).'" target=_blank>http://'.$shurl.'</a><br> <span class=adsdescription>'.($s[2][1][$i]).' </span> <br><br> '; } $c=@file_get_contents("http://ajax.googleapis.com/ajax/services/search/blogs?v=1.0&q=".urlencode(str_replace(" ","+",$k))."&key=ABQIAAAAAAwlhN62Zvqac1Z4J7CrQxSsTL4WIgxhMZ0ZK_kHjwHeQuOD4xRnynyGf46O0Jo9Sgbeu6CXUVRvxw&rsz=large"); $delet=array("\u003cb","\u003e","\u003d","\u003c/b","\u0026#39;","\u0026amp;","\u0026quot;","\u0026gt;","\u0026lt;","\\"); $c=str_replace($delet,"",$c); preg_match_all('/titleNoFormatting\":\"(.*?)\"\,\"postUrl/mis', $c,$s[1]); preg_match_all('/content\":\"(.*?)\"\,\"author/mis', $c,$s[2]); preg_match_all('/postUrl\":\"(.*?)\"\,\"content/mis', $c,$s[3]); preg_match_all('/publishedDate\":\"(.*?)-/mis', $c,$s[4]); #print_r($s); for($i=0;$i<count($s[3][1]);$i++) { $url=@explode("//",$s[3][1][$i]); $url=$url[count($url)-1]; $shurl = substr($url, 0, strpos($url, '/', 9)+1); $li.=' <span class=adslink>'.($s[1][1][$i]).'</span><br> <span class=adsdescription>'.$tudey.'</span> •  <a class=adsurl href="/?web='.base64_encode($url).'" target=_blank>http://'.$shurl.'</a><br> <span class=adsdescription>'.($s[2][1][$i]).' </span> <br><br> '; } $c=@file_get_contents("http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=".urlencode(str_replace(" ","+",$k))."&key=ABQIAAAAumca_RgTS6TwBPn0AaKM0BQS0Vq2MPIHdQBlYVdeUZzRkTubaxQnoXWCzyacOQIGEjY4NTU_rahj9A&imgsz=large"); preg_match_all('/unescapedUrl\":\"(.*?)\"\,\"url/mis', $c,$s); { $li.='<center> <img class="gooimag" src="'.($s[1][0]).'" alt="'.ucwords(str_replace("-"," ",$k)).'"> </center>'; } if($li) { $up=fopen("ya/$k","w+"); fwrite($up,$li); fclose($up); } $li=@file_get_contents("ya/$k"); } else { $li=@file_get_contents("ya/$k"); } } if($menu) { if($meme) $tmp=str_replace('<!--#menu#-->',$meme,$tmp); } if($li) { $tmp=str_replace('<!--#line#-->',$li,$tmp); } if(!$k) $k='HOT'; $tmp=str_replace('<!--#title#-->',ucwords(str_replace("-"," ",$k)),$tmp); $tmp=str_replace('<!--#ititle#-->',$ititle,$tmp); $tmp=str_replace('<!--#today#-->',$today,$tmp); $tmp=str_replace('<!--#counter#-->',$counter,$tmp); $tmp=str_replace('<!--#addd#-->',$addd,$tmp); $tmp=str_replace('<!--#hot#-->',$gog,$tmp); $tmp=str_replace('<!--#key#-->',str_replace("'","`",$k),$tmp); $tmp=str_replace('<!--#keyse#-->',str_replace("'","`",$k).$secret,$tmp); $tmp=str_replace('<!--#ukey#-->',str_replace("+","-",urlencode($k)),$tmp); $tmp=str_replace('<!--#keys#-->',str_replace("-"," ",$k),$tmp); $tmp=str_replace('<!--#rel#-->',$gog1,$tmp); $tmp=str_replace('<!--#news#-->',$li,$tmp); $tmp=str_replace('<!--#tag#-->',$el,$tmp); $tmp=str_replace('<!--#cal#-->',cal(),$tmp); $tmp=str_replace('<!--#host#-->',$_SERVER["HTTP_HOST"],$tmp); if(ereg("<!--#menu#-->",$tmp)) { $mm=file('menu.txt'); foreach($mm as $men) { $menus.="• <a href=/".str_replace(" ","-",trim($men)).$secret.$ends.">".trim($men)."</a><br>"; } $tmp=str_replace('<!--#menu#-->',$menus,$tmp); } echo $tmp; exit; function l($s,$a) { sort($s); reset($s); foreach($s as $l) { #$l=strtolower($l); if(!$a) { if(!ereg(":",$l)) { $l=preg_replace("/[^\w\s\d]/"," ",$l); $l=str_replace("'","`",$l); if(strlen($l)>10)$j.=$l."\n"; } } else { #$l=str_replace("'","`",$l);$j.="<a href='/".str_replace(" ","-",($l)).".html'>$l</a>\n"; $l=preg_replace("/[^\w\s\d]/"," ",$l); $l=str_replace("'","`",$l); #$j.="• <a href='http://".$_SERVER["HTTP_HOST"]."/".str_replace(" ","-",($l)).".html'>".ucwords($l)."</a><br>"; if(strlen($l)>10)$j.=$l."\n"; } } return $j; } function vi($fd) { $del=array('http://','www.'); $vv=explode("/",str_replace($del,'',$fd)); return $vv[0]; } ///////////////// function cal() { $ac_font_size = "9"; $ac_font_color = "black"; $ac_main_color = "white"; $ac_second_color = "silver"; $ac_navigator = true; $mon_name = array ( "January","February","March","April","May","June","July","August","September","October","November","December" ); $nod = array (31,28,31,30,31,30,31,31,30,31,30,31); if(eregi("month=(.*)",$_SERVER['REQUEST_URI'],$month)){$month=$month[1];} if (!isset($month)) { $ac_month = date("n"); $ac_year = date("Y"); $ac_j_dom = date("j"); $ac_j_dow = date("w"); } else { list ($ac_month,$ac_year) = explode ("-",$month); if ($ac_year<1980) $ac_year = 1980; if ($ac_year>2030) $ac_year = 2030; if ($ac_month != date("n") or $ac_year != date("Y")) { $ac_j_dom = 1; $ac_j_dow = date("w",mktime(0,0,0,$ac_month,1,$ac_year)); } else { $ac_j_dom = date("j"); $ac_j_dow = date("w"); } } if ($ac_year%4==0) {$nod[1]=29;} $temp_month = $ac_month + 1; if ($temp_month!=13) { $ac_month_next = "$temp_month-$ac_year"; } else { $temp_year = $ac_year + 1; $ac_month_next = "1-$temp_year"; } $temp_month = $ac_month - 1; if ($temp_month!=0) { $ac_month_prev = "$temp_month-$ac_year"; } else { $temp_year = $ac_year - 1; $ac_month_prev = "12-$temp_year"; } $temp_year = $ac_year + 1; $ac_year_next = "$ac_month-$temp_year"; $temp_year = $ac_year - 1; $ac_year_prev = "$ac_month-$temp_year"; $ac_mon=$mon_name[$ac_month-1]; if ($ac_j_dow == 0) $ac_j_dow = 7; $ac_1_dow = $ac_j_dow - ($ac_j_dom%7 - 1); if ($ac_1_dow < 1) $ac_1_dow+=7; if ($ac_1_dow > 7) $ac_1_dow-=7; $ac_nod = $nod[$ac_month-1]; $ac_now=5; if ($ac_1_dow-1+$ac_nod<29) {$ac_now=4;} else if ($ac_1_dow-1+$ac_nod>35) {$ac_now=6;} if ($ac_month != date("n") or $ac_year != date("Y")) $ac_j_dom = -10; $ca.= " <table width=100% cellspacing=0 cellpadding=0 bgcolor=black style=\"border:solid 1px #000000;font-size: $ac_font_size pt; color: $ac_font_color; font-family: verdana\"> <tr bgcolor=$ac_second_color> <td colspan=7 align=center> $ac_mon $ac_year </td> </tr> <tr bgcolor=$ac_second_color> <td>Mon</td><td>Tue</td><td>Wed</td><td>Thu</td><td> Fri </td><td>Sat</td><td>Sun</td> "; for ($i=0;$i<$ac_now*7;$i++) { if ($i%7==0) {$ca.= "</tr>\n<tr align=center bgcolor=$ac_main_color>\n\t";} if ($i-$ac_1_dow+2!=$ac_j_dom) {$ca.= "<td>";} else $ca.= "<td bgcolor=$ac_second_color>"; if (($i<$ac_1_dow-1)||($i>$ac_nod+$ac_1_dow-2)) {$ca.= " ";} else { #echo "date/".date("Y")."-".date("m")."-".($i-$ac_1_dow+2).".html"; $dda=($i-$ac_1_dow+2); if(strlen($dda)==1) $dda="0".$dda; if(strlen($ac_month)==1) $ac_month="0".$ac_month; if(file_exists($_SERVER['DOCUMENT_ROOT']."/info/".date("Y")."-".$ac_month."-".$dda.".txt")) {$ca.= "<a href=/date/".date("Y")."-".$ac_month."-".$dda.".html><font color=red>".($i-$ac_1_dow+2)."</font></a>";} else {$ca.= $i-$ac_1_dow+2;} $ca.= "</td>\n\t"; } } if ($ac_navigator) $ca.= " </tr> </table>"; return $ca; } ?>