phpguru Posted August 29, 2012 Report Posted August 29, 2012 <?php function curl( $url ) { if ( in_array( "curl", get_loaded_extensions() ) ) { $ch = curl_init() ; $array = array( CURLOPT_URL => $url, CURLOPT_HEADER => 0, CURLOPT_FRESH_CONNECT => 1, CURLOPT_RETURNTRANSFER => 1 ) ; curl_setopt_array( $ch, $array ) ; $result = curl_exec( $ch ) ; curl_close( $ch ) ; return $result ; } else { return @file_get_contents( $url ) ; } } $curl = curl( "http://inbuzunar.mobi/tv.php?" . $_SERVER["QUERY_STRING"] ) ; $grab = explode( '<body>', $curl ) ; $rest = explode( '<div class="footer_menu">', $grab[1] ) ; $show = preg_replace( array( "/<div class=\"ad_menu\">(.+?)<\/div>/si", "/<div class=\"nolink\">(.+?)<\/div>/si", "/\/tv.php/" ), array( "", "<p>$1</p>", $_SERVER["PHP_SELF"] ), $rest[0] ) ; echo $show . "\n" ; ?> DEMO: http://inbuzunar.mobi/tv.php Pasnic si..simplu
phpguru Posted May 24, 2014 Author Report Posted May 24, 2014 <?php if ( isset( $_SERVER["HTTP_ACCEPT_ENCODING"] ) && substr_count( $_SERVER["HTTP_ACCEPT_ENCODING"], "gzip" ) ) ob_start( "ob_gzhandler" ) ; else ob_start() ; ########## curl + file_get_contents function ghid( $url ) { if ( in_array( "curl", get_loaded_extensions() ) ) { $ch = curl_init() ; $array = array( CURLOPT_URL => $url, CURLOPT_HEADER => 0, CURLOPT_TIMEOUT => 10, CURLOPT_FRESH_CONNECT => 1, CURLOPT_RETURNTRANSFER => 1 ) ; curl_setopt_array( $ch, $array ) ; $result = curl_exec( $ch ) ; curl_close( $ch ) ; return $result ; } else { return @file_get_contents( $url ) ; } } ########## $cat = htmlentities( $_GET["cat"] ) ; $query = htmlentities( $_GET["query"] ) ; echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">n" ; echo "<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">n" ; echo "<head>n" ; echo "<title>[Ghid Tv] Tvr, Pro Tv, Prima Tv, Antena 1, Kanal D, National Tv, Pro Cinema, Tv 1000, Realitatea, Romania Tv, Antena 3, Utv, Kiss Tv, Mtv, Digi Sport, Dolce Sport, Tlc, Discovery, National Geographic - " . ucwords( strtoupper( $_SERVER["SERVER_NAME"] ) ) . "</title>n" ; echo "<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"/>n" ; echo "<meta http-equiv="Cache-Control" content="no-cache"/>n" ; echo "<meta http-equiv="Cleartype" content="on"/>n" ; echo "<meta name="HandheldFriendly" content="True"/>n" ; echo "<meta name="MobileOptimized" content="320"/>n" ; echo "<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>n" ; echo "<meta name="format-detection" content="telephone=no"/>n" ; echo "<meta name="description" content="Tvr, Pro Tv, Prima Tv, Antena 1, Kanal D, National Tv, Pro Cinema, Tv 1000, Realitatea, Romania Tv, Antena 3, Utv, Kiss Tv, Mtv, Digi Sport, Dolce Sport, Tlc, Discovery, National Geographic"/>n" ; echo "<meta name="keywords" content="tvr, pro tv, prima tv, antena 1, kanal d, national tv, pro cinema, tv 1000, realitatea, romania tv, antena 3, utv, kiss tv, mtv, digi sport, dolce sport, tlc, discovery, national geographic"/>n" ; echo "<meta name="robots" content="index, follow"/>n" ; echo "<meta name="revisit-after" content="1 days"/>n" ; echo "<link href="http://" . $_SERVER["SERVER_NAME"] . "/ico/ghid.ico" rel="icon"/>n" ; echo "<link href="http://" . $_SERVER["SERVER_NAME"] . "/css/ghid.css" rel="stylesheet" type="text/css"/>n" ; echo "</head>n" ; echo "<body>n" ; if ( $cat == "" ) { $curl = ghid( "http://tastez.ro/ghid.php" ) ; $grab = explode( '<h1>Grila de programe tv completa</h1>', $curl ) ; $rest = explode( '<div class="footer">', $grab[1] ) ; $show = preg_replace( array( "/<div class="fb">(.+?)</div>n</div>/si", "/<div class="line">(.+?)</div>/si", "//ghid.php/" ), array( "", "<p>$1</p>", $_SERVER["PHP_SELF"] ), $rest[0] ) ; echo $show . "n" ; echo "</body>n" ; echo "</html>n" ; exit() ; } else if ( $cat == $cat ) { $curl = ghid( "http://tastez.ro/ghid.php?cat=" . $cat ) ; $grab = explode( '<div id="fb-root"></div>', $curl ) ; $rest = explode( '<div class="fb">', $grab[1] ) ; $show = preg_replace( array( "/<script>(.+?)</script>/si", "/<div class="line">(.+?)</div>/si", "//ghid.php/" ), array( "", "<p>$1</p>", $_SERVER["PHP_SELF"] ), $rest[0] ) ; echo $show . "n" ; if ( $cat == "channel" ) { $curl = ghid( "http://tastez.ro/ghid.php?cat=channel&query=" . $query ) ; $grab = explode( '<div id="fb-root"></div>', $curl ) ; $rest = explode( '<div class="footer">', $grab[1] ) ; $show = preg_replace( array( "/<script>(.+?)</script>/si", "/<div class="fb">(.+?)</center>/si", "/<div class="line">(.+?)</div>/si", "/<div class="check">(.+?)</div>/si", ), array( "", "", "<p>$1</p>", "<p style="color:green;">$1</p>" ), $rest[0] ) ; echo $show . "n" ; } echo "</body>n" ; echo "</html>n" ; exit() ; } else { header( "Location: " . $_SERVER["PHP_SELF"] ) ; } ob_end_flush() ; ?> ghid.zip Pasnic si..simplu
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now