zeryl-youtube-proxy-browser

Gesponsorde koppelingen

PHP script bestanden

  1. zeryl-youtube-proxy-browser

« Lees de omschrijving en reacties

======= index.php (je kun de rest vinden als je de script download) =======

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?php
/*****
 *  Copyright 2008 Hoshang Sadiq, Zeryl
 *
 *  JW FLV Media Player v3.14
 *  by Jeroen Wijering - http://www.jeroenwijering.com/
 *
 *  SWFObject v1.5
 *  by Geoff Stearns - http://blog.deconcept.com/swfobject/
 *  2007
 *
 *  For more information on this script, visit:
 *  http://ytexp.zeryl.net/
 *
 *  This file is part of Zeryl YouTube Proxy Browser (Z.Y.P.B.).
 *
 *  Z.Y.P.B. is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Z.Y.P.B. is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Z.Y.P.B.  If not, see <http://www.gnu.org/licenses/>.
 *******/


include_once('functions.php');
include_once('xml2array.class.php');
include_once('youtube.class.php');
include_once('connect.php');

$stag = '';
$tag = checkget('tag');
if($tag != '') {
    $stag = urlencode($tag);
}


$type = checkget('type');
if($type == '') {
    $type = 'top_rated';
}


//die(idOnly('http://www.youtube.com/watch?v=cI1AwZN4ZYg'));
$yt = new youtube($type, $stag);
$res = $yt->display();
if(isset($res['videos'])) {
    $video_list = $res['videos'];
}
else {
    $video_list = array();
}

$first_vid = $res['video_id'];
$first_index = $res['video_index'];
$pages = $res['pages'];

$get_array = YoutubeGetLink($first_vid);
$link = $get_array['link'];
$img = $get_array['imglink'];

if($log_videos == true) {
    $sql = "SELECT `yt_id`, `yt_views`, `yt_downloads` FROM `downloads` WHERE `yt_id` = '".$first_vid."';";
    $query = @mysql_query($sql) or yt_log(mysql_error(), 'Could not select from downloads', __LINE__, __FILE__);
    $results = @mysql_fetch_assoc($query);
}


if(!(isset($results['yt_id']) && $results['yt_id'] == $first_vid)) {
    $results['yt_id'] = $first_vid;
    $results['yt_views'] = 0;
    $results['yt_downloads'] = 0;
}


include('header.php');
?>
        <div id="rightmenu">
            <h2><?php echo fromlist($video_list, $first_index, 'title', 'Unknown'); ?></h2>

            <div id="flashplayer"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>

            <script type="text/javascript">
            <!--
                var object = new SWFObject("player.swf", "mediaplayer", "425", "350", "7");
                object.addParam("allowfullscreen", "true");
                object.addVariable("width", "425");
                object.addVariable("height", "351");
                object.addVariable("showstop", "true");
                object.addVariable("file", encodeURIComponent("<?php echo $link; ?>"));
                object.addVariable("image", encodeURIComponent("<?php echo $img; ?>"));
                object.addVariable("type", "flv");
                object.write("flashplayer");
            -->
            </script>

            <div class="stats">
                Author: <span class="statVal"><?php echo fromlist($video_list, $first_index, 'authorname', 'Unknown'); ?></span><br />
                Views: <span class="statVal"><?php echo $get_array['views']; ?> (YouTube Only)</span><br />
                Views: <span class="statVal"><?php echo $results['yt_views']; ?> (Zeryl Only)</span><br />
                Comments: <span class="statVal"><?php echo $get_array['comments']; ?></span><br />
                Added: <span class="statVal"><?php echo $get_array['posted_on']; ?></span><br />
                Tags: <span class="statVal"><?php echo generate_tags($get_array['tags']); ?></span><br />
                Download: <span class="statVal"><a href="<?php echo $get_array['dllink']; ?>">download</a></span><br />
                Downloads: <span class="statVal"><?php echo $results['yt_downloads']; ?> (Zeryl Only)</span><br />
                YouTube link: <a href="<?php echo fromlist($video_list, $first_index, 'url', '0'); ?>" target="_blank"><?php echo fromlist($video_list, $first_index, 'url', '0'); ?></a>
            </div>
            <br /><br />
            <div id="description">
                <?php echo nl2br(stripslashes(htmlspecialchars($get_array['desc']))); ?>
            </div>
        </div>
        <div id="inside">
            <form method="get" action="index.php">
                View <select name="type">
                  <option value="top_rated" <?php echo ($type == '' || $type == 'top_rated') ? 'selected="selected"' : ''; ?>>Top rated</option>
                  <option value="top_favorites" <?php echo ($type == 'top_favorites') ? 'selected="selected"' : ''; ?>>Top favorites</option>
                  <option value="most_viewed" <?php echo ($type == 'most_viewed') ? 'selected="selected"' : ''; ?>>Most viewed</option>
                  <option value="most_recent" <?php echo ($type == 'most_recent') ? 'selected="selected"' : ''; ?>>Most recent</option>
                  <option value="most_discussed" <?php echo ($type == 'most_discussed') ? 'selected="selected"' : ''; ?>>Most discussed</option>
                  <option value="most_linked" <?php echo ($type == 'most_linked') ? 'selected="selected"' : ''; ?>>Most linked</option>
                  <option value="most_responded" <?php echo ($type == 'most_responded') ? 'selected="selected"' : ''; ?>>Most responded</option>
                  <option value="recently_featured" <?php echo ($type == 'recently_featured') ? 'selected="selected"' : ''; ?>>Recently featured</option>
                </select>
                <input value="Go" type="submit" />
            </form>
            <?php pages($pages); ?>
            <table id="results">
                <tbody>
<?php
// loop through each video in the list and display it for design purposes
$i = 0;
if(isset($_GET['page']) && $_GET['page'] != '' && $_GET['page'] != 0) {
    $stag .= '&amp;page='.$_GET['page'];
}

$tr = true;
if(isset($video_list) && count($video_list) > 0) {
    foreach ($video_list as $index => $video) {
        if ($tr == true) {
            echo '                    <tr>'."\n";
            $tr = false;
        }

        // limit the title's length so it doesn't break the design
        $title = shorten($video['title'], 10, $video['id'], $stag);
        $thumburl = 'get.php?vid='.$video['id'].'&amp;get_image_only=true&amp;file_type=.jpg';
        $length = sec2hms($video['length']);
        $ustag = ($stag != '') ? 'tag='.$stag.'&amp;' : '';
        $ustag .= 'type='.$type.'&amp;';
        $rating = (isset($video['avrating']) && $video['avrating'] > 0) ? $video['avrating'].' / '.$video['totalrates'] : '0 / 0';
        echo '                        <td class="thumb">'."\n";
        echo '                            <a href="?'.$ustag.'video_id='.$video['id'].'"><img src="'.$thumburl.'" alt="'.htmlspecialchars($video['title']).'" /></a><br />'."\n";
        echo '                            <span class="title_short">'.$title.'</span><br />'."\n";
        echo '                            <span class="length_short">length: '.$length.'</span><br />'."\n";
        echo '                            <span class="rating_short">'.$rating.'</span><br />'."\n";
        echo '                        </td>'."\n";
        // only 4 videos per row
        $i++;
        if ($i == 4) {
            echo '                    </tr>'."\n";
            $i = 0;
            $tr = true;
        }
    }
}
else {
    echo '<br /><br /><br /><h1>Something went wrong, please try again later</h1><br /><br />';
}

?>

                </tbody>
            </table>
            <?php pages($pages); ?>
        </div>
<?php include('footer.php'); ?>

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.