1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

[ASK]Tampilan web tidak muncul

Discussion in 'Pemrograman Web' started by Barandot, Jun 14, 2016.

  1. Barandot

    Barandot Newbie

    Joined:
    Jan 25, 2016
    Messages:
    43
    Likes Received:
    4
    Malem mastah..Newbie mohon minta pencerahannya... :malu:

    Langsung aja ke inti masalahnya ya, saya seorang yang buta dengan coding2an tapi pengen buat landing page dan kebetulan ada yang share landing page gratis. Tapi pas saya upload ke cpanel ko tampilannya gak keluar, di firefox source codenya juga gak keluar.. itu kenapa ya gan..


    web: movies.100kmh.net/index.php
    Scriptnya:

    Code:
    
    <?php
        error_reporting(1);
        
        $movie = $_GET[movie];
        $tmdb_api_key = '9366d6385a1a15cab92bdde8de2b98af'; // change it with your themoviedb.com API
        $aff_link = 'http://google.com'; // your offer link
        
        $image_host    = 'http://d3gtl9l2a4fn1j.cloudfront.net/t/p/';
        $json_tmdb  = 'http://api.themoviedb.org/3/movie/'.$movie.'?api_key='.$tmdb_api_key.'&append_to_response=credits,images,trailers,keywords,releases,similar_movies';
                
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $json_tmdb);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
        curl_setopt($ch, CURLOPT_HEADER, FALSE);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
        $response = curl_exec($ch);
        curl_close($ch);
        
        $data = json_decode($response);
        
        if ($data->title == null) {
            die;
        }
        
        $backdrop_to_background = $backdrop_to_player = 0;
        $backdrops = count($data->images->backdrops);
        
        if ($backdrops > 1) {
            $backdrop_to_player = rand(0, $backdrops-1);
            
            $backdrop_to_background = $backdrop_to_player;
            while ($backdrop_to_background == $backdrop_to_player) {
                $backdrop_to_background = rand(0, $backdrops-1);
            }
        }
        
        $movie_title      = $data->title;
        $movie_runtime       = $data->runtime;
        
        $n = count($data->genres);
        $i = 0;
        $movie_genres = '';
        while ($i <= $n-1) {
            $movie_genres .= $data->genres[$i]->name;
            if ($i < $n-1) {
                $movie_genres .= ', ';
            }
            $i++;
        }
            
        $n = count($data->credits->cast);
        $i = 0;
        $movie_cast = '';
        while ($i <= $n-1) {
            $movie_cast .= $data->credits->cast[$i]->name . ' (' . $data->credits->cast[$i]->character . ')';
            if ($i < $n-1) {
                $movie_cast .= ', ';
            }
            $i++;
        }
        
        $movie_plot       = $data->overview;
        $movie_poster        = $image_host.'w185'.$data->poster_path;
        $movie_player     = $image_host.'w780'.$data->images->backdrops[$backdrop_to_player]->file_path;
        $movie_background = $image_host.'w780'.$data->images->backdrops[$backdrop_to_background]->file_path;
    
    ?>
    
    <html>
    <head>
    <title>Watch <?php echo $movie_title;?> Full Movie</title>
    <link href="img/favicon.ico" rel="shortcut icon">
    <link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
    <link href="http://fonts.googleapis.com/css?family=Cabin" rel="stylesheet" type="text/css">
    
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        $(document).ready(
            function(){
                $("#player-play").click(
                    function(){
                        $("#player-container").attr("style","background: url(img/stripes.png); background-repeat : repeat; z-index: 1; width: 854px; height: 480px; margin: 100px auto; position: absolute; top:0; left:0; bottom:0; right:0; z-index: 1; opacity: 0.9; filter:alpha(opacity=90); border: 20px solid rgba(255, 0, 0, 0.3);");
                        $("#player-play").addClass("player-hidden");
                        $("#player-error").removeClass("player-hidden")
                    }
                )
            }
        )
    </script>
    
    <style>
    
    body {
        margin : 0px 0px 0px 0px;
        background-color: #060606;
    }
    
    .player-play {
        width: 854px;
        height: 480px;
        background: url(img/inactive-button.png) no-repeat;
        background-size: cover;
        cursor: pointer;
        z-index: 2;
    }
    
    .player-play:hover {
        background : url(img/active-button.png) no-repeat;
    }
        
    .player-error {
        padding-top : 22%;
        max-width : 854px;
        margin : 0 auto;
        text-align : center;
        line-height : 5px;
        z-index : 2
    }
    
    .player-error p {
        color : #fff;
        font-size : 18px;
        margin : 20px auto;
    }
    
    .player-error a {
        color : #fff;
        font-size : 22px;
        text-decoration:underline;
    }
    
    .player-hidden {
        display:none!important;
        visibility:hidden!important;
    }
    
    .movie-title {
        font-family: 'Lobster', Georgia, Times, serif;
        font-size: 40px;
        line-height: 50px;
        color : #fff;
        text-align: center;
        margin-top: 15px;
    }
     
    .movie-plot {
        font-family: 'Cabin', Helvetica, Arial, sans-serif;
        font-size: 15px;
        line-height: 20px;
        color : #ffffff;
        width: 854px;
        margin : 570px auto;
        text-align: justify;
    }
    
    
    
    </style>
    
    </head>
    
    <body> 
    
    
    <div class="movie-title">"<?php echo $movie_title; ?>" Full Movie</div>
    <div style="background: url(<?php echo $movie_background;?>); background-attachment: fixed; background-repeat: no-repeat; background-size: cover; opacity: 0.3; filter:alpha(opacity=30); position:absolute; top:0; left:0; width:100%; height:100%;"></div>
    <div style="background: url(<?php echo $movie_player;?>); background-repeat : no-repeat; background-size: cover; z-index: 1; width: 854px; height: 480px; margin: 100px auto auto; position: absolute; top:0; left:0; bottom:0; right:0; z-index: 1; border: 20px solid rgba(255, 0, 0, 0.3);" id="player-container">
        <div class="player-play" id="player-play"></div>
        <div class="player-error player-hidden" id="player-error">
            <img src="img/error.png" alt="error">
            <p>A plugin is needed to display this video.</p>
            <a href="<?=$aff_link;?>" target="_self">Install plugin...</a>
        </div>
    </div>
    <div class="movie-plot">
        <img src="<?php echo $movie_poster;?>" style="float: left; width: 120px; margin:0px 10px 10px 0px;">
        <p><b>Title : </b> <?php echo $movie_title; ?></p>
        <p><b>Genre : </b> <?php echo $movie_genres; ?></p>
        <p><b>Cast : </b> <?php echo $movie_cast; ?></p>
        <p><b>Movie Plot : </b><?php echo $movie_plot;?><br><br></p>
    </div>
        
    <?php
        
          $ytfeedURL = 'https://gdata.youtube.com/feeds/api/videos?q=trailer '.$movie_title.'+official+trailer&max-results=1&v=2';
          $ytxml = simplexml_load_file($ytfeedURL);
    
        foreach ($ytxml->entry as $entry) {
            $media = $entry->children('http://search.yahoo.com/mrss/');
            $attrs = $media->group->player->attributes();
            $watch = $attrs['url']; 
            $attrs = $media->group->content->attributes();
            $player = str_replace("https://www.youtube.com/v/", "", $attrs['url']); 
        }
    
        echo"<iframe width='0' height='0' src='http://www.youtube.com/embed/$player?vq=hd720&amp;autohide=1&amp;autoplay=1&amp;modestbranding=0&amp;showinfo=0&amp;rel=0&amp;iv_load_policy=3' frameborder='0' allowfullscreen></iframe>";    
        
    ?>
    
    </body>
    </html>
    
     
  2. Oby_One

    Oby_One Banned

    Joined:
    Jul 11, 2007
    Messages:
    5,080
    Likes Received:
    246
    Location:
    |Pulau Sabang - Aceh|
    nunggu mastah dibawah ane aja gan,... kurang mudeng juga neh.. :peace:
     
  3. ariefsanjani

    ariefsanjani Hero

    Joined:
    Feb 19, 2015
    Messages:
    623
    Likes Received:
    27
    Location:
    In your Mind !
    Cek aja error log nya biar ketahuan masalahnya dimana, atau bisa dicoba ganti versi php nya ke yg lebih lawas,

    Sent from my 2014817 using Tapatalk
     
  4. maalysapry

    maalysapry Newbie

    Joined:
    Jun 18, 2016
    Messages:
    43
    Likes Received:
    0
    wah koreksi script ni
     
  5. iwiel

    iwiel Ads.id Pro

    Joined:
    Feb 28, 2011
    Messages:
    261
    Likes Received:
    17
    Location:
    Jaksel
    line ini
    diganti ini gan
     
  6. kianz10

    kianz10 Newbie

    Joined:
    Jul 18, 2016
    Messages:
    3
    Likes Received:
    0
    kenapa bisa begitu
     
  7. hendranata

    hendranata Hero

    Joined:
    Jul 7, 2015
    Messages:
    700
    Likes Received:
    45
    Location:
    Surabaya
    coba inspect element..
    atau coba trace satu2 line code..
     
  8. adecma

    adecma Newbie

    Joined:
    Jul 28, 2016
    Messages:
    21
    Likes Received:
    0
    coding emg gitu, kudu try error amati try error amati dst
     

Share This Page