-
Notifications
You must be signed in to change notification settings - Fork 1
/
kitapdetay.php
171 lines (109 loc) Β· 4.39 KB
/
kitapdetay.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
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
error_reporting(0);
function get_web_page( $url )
{
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => false, // don't return headers
CURLOPT_FOLLOWLOCATION => true, // follow redirects
CURLOPT_ENCODING => "", // handle all encodings
CURLOPT_USERAGENT => "spider", // who am i
CURLOPT_AUTOREFERER => true, // set referer on redirect
CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect
CURLOPT_TIMEOUT => 120, // timeout on response
CURLOPT_MAXREDIRS => 10, // stop after 10 redirects
CURLOPT_SSL_VERIFYPEER => false // Disabled SSL Cert checks
);
$ch = curl_init( $url );
curl_setopt_array( $ch, $options );
$content = curl_exec( $ch );
$err = curl_errno( $ch );
$errmsg = curl_error( $ch );
$header = curl_getinfo( $ch );
curl_close( $ch );
$header['errno'] = $err;
$header['errmsg'] = $errmsg;
$header = $content;
return $header;
}
$url=base64_decode($_GET['link']);
$c=get_web_page($url);
$baslik='@<h1 itemprop="name" class="product-heading">(.*?)</h1>@si';
preg_match_all($baslik, $c, $title);
//$yazar='@<span itemprop="name"> (.*?)</span>@si';
//preg_match_all($yazar, $c, $author);
$yayinevi='@<a itemprop="url" href="(.*?)"><span itemprop="name">(.*?)</span></a>@si';
preg_match_all($yayinevi, $c, $yayinevi_1);
$icer='@<span itemprop="description">(.*?)</span>@si';
preg_match_all($icer, $c, $icerik);
$res='@<img itemprop="image" src="(.*?)" style="width: 180px; height: 272px;">@si';
preg_match_all($res, $c, $resim);
$isim= $title[1][0];
$yazar= $yayinevi_1[2][0];
$yayin= $yayinevi_1[2][1];
$icerik=$icerik[1][0];
$resim=$_GET['resim'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title><?php echo $isim; ?></title>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Material Design Bootstrap -->
<link href="css/mdb.min.css" rel="stylesheet">
<!-- Your custom styles (optional) -->
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<!-- Start your project here-->
<header style=" margin-top: 100px;">
<hr class="my-3">
<!-- Projects section v.3 -->
<section class="my-5 mx-5">
<!-- Grid row -->
<div class="row">
<!-- Grid column -->
<div class="col-md-3 ">
<!--Image-->
<img src="<?php echo $resim; ?>" alt="Sample project image" style="max-height:450px; " class="img-fluid rounded z-depth-1">
</div>
<!-- Grid column -->
<!-- Grid column -->
<div class="col-md-7">
<!-- Section heading -->
<h2 class="h1-responsive font-weight-bold my-1"> <i class="fa fa-book fa-1x cyan-text"></i> Kitap AdΔ±: <?php echo $isim; ?></h2>
<hr class="my-2">
<!-- Grid row -->
<div class="row mb-1">
<div class="col-md-12 col-10">
<h5 class="font-weight-bold mb-3"> <i class="fa fa-pencil fa-1x red-text"></i> Yazar: <?php echo $yazar; ?></h5>
<h5 class="font-weight-bold mb-3"><i class="fa fa-smile-o fa-1x blue-text"> </i> YayΔ±nevi: <?php echo $yayin; ?></h5>
<p class="black-text"> <?php echo $icerik; ?></p>
</div>
</div>
<!-- Grid row -->
</div>
<!-- Grid column -->
</div>
<!-- Grid row -->
<hr class="my-3">
</section>
<!-- Projects section v.3 -->
<!-- /Start your project here-->
<!-- SCRIPTS -->
<!-- JQuery -->
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="js/popper.min.js"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<!-- MDB core JavaScript -->
<script type="text/javascript" src="js/mdb.min.js"></script>
</body>
</html>