Jump to content

Script Program Tv


phpguru

Recommended Posts


<?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

Link to comment
Share on other sites

  • 1 year later...

<?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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.