-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcache_movie_posters.php
110 lines (90 loc) · 1.78 KB
/
cache_movie_posters.php
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
<html>
<head>
<style>
* {
margin:0;
padding:0;
outline:0;
}
body {
background:#000000;
}
#scroll {
text-align:center;
width:100%;
height:180px;
margin:0px auto;
background:#000000;
border:0px solid #000;
overflow:auto;
}
#scroll div {
float:left;
text-align:center;
margin-right:-999em;
white-space:nowrap;
}
#scroll img {
margin:5px 5px 0 5px;
}
/* ------------- Flexcroll CSS ------------ */
.scrollgeneric {
line-height:1px;
font-size:1px;
position:absolute;
top:0;left:0;
}
.hscrollerbase {
height:17px;
background:#999;
}
.hscrollerbar {
height:12px;
background:#000;
cursor:e-resize;
padding:3px;
border:1px solid #999;
}
.hscrollerbar:hover {
background:#222;
border:1px solid #222;
}
#rightImage
{
height:138px;
width: 92px;
margin: 10px;
float:left;
position:relative;
}
#rightImage:hover img
{
height: 150px;
width: 100px;
margin: 0px;
}
</style>
<script type="text/javascript" src="flexcroll.js"></script>
</head>
<body bgcolor="black">
<?PHP
include "config.inc.php";
$db_handle = mysqli_connect($server, $username, $password);
$db_found = mysqli_select_db($db_handle, $database);
if ($db_found) {
$SQL = "select * from movie_view Order By c00 Asc";
$result = mysqli_query($db_handle, $SQL);
while ( $db_field = mysqli_fetch_assoc($result) ) {
$imdb = $db_field['uniqueid_value'];
$json=file_get_contents("https://api.themoviedb.org/3/movie/" . $imdb . "?api_key=" . $apikey);
$info=json_decode($json, TRUE);
$poster = $info['poster_path'];
$poster_path = "http://image.tmdb.org/t/p/w92/" . $poster;
file_put_contents("posters/" . $imdb . ".jpg", fopen($poster_path, 'r'));
}
mysqli_close($db_handle);
}
else {
print "Database NOT Found ";
}
?>