Showing
3 changed files
with
366 additions
and
0 deletions
index.php
0 → 100644
1 | + | ||
2 | +<html lang="ko"> | ||
3 | +<head> | ||
4 | + <meta charset="utf-8"> | ||
5 | + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> | ||
6 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"/> | ||
7 | + <meta name="csrf-token" content="owQv0CqogJqcTArsapNyHqtzQ04HfPAE6e92x2qu"> | ||
8 | + <title>또 게임해? 배틀그라운드 전적검색</title> | ||
9 | + <meta name="description" content="배그 전적검색, 카카오 서버, 레이팅, 순위표, 대회, 랭킹, 로그, 인벤, 서버, 장애, 점검, OP.GG"> | ||
10 | + <meta name="keywords" | ||
11 | + content="배그, 배그전적, 배그전적검색, 배틀그라운드 전적검색 사이트, 닥지지, 순위표, ESL, 대회, 게임스컴, 리더보드, 랭킹, 통계, 레이팅, 스탯, 로그, 승률, 킬뎃, 딜량, 디스코드, 핵쟁이, 서버, 장애, 점검, 인벤, OP.GG"> | ||
12 | + <meta property="og:title" content="배틀그라운드 전적검색 - 닥지지"/> | ||
13 | + <meta property="og:description" content="배그 전적검색, 카카오 서버, 레이팅, 순위표, 대회, 랭킹, 로그, 인벤, 서버, 장애, 점검, OP.GG"/> | ||
14 | + <meta property="og:type" content="website"/> | ||
15 | + <meta property="og:url" content="https://dak.gg/"/> | ||
16 | + <meta property="og:image" content="https://vweacphuxfka531192.cdn.ntruss.com/images/og_title_dakgg.png"/> | ||
17 | + <meta property="og:site_name" content="배틀그라운드 전적검색 - 닥지지"/> | ||
18 | + <meta property="twitter:image" content="https://vweacphuxfka531192.cdn.ntruss.com/images/og_title_dakgg.png"/> | ||
19 | + <link rel="canonical" href="https://dak.gg/"/> | ||
20 | + <link rel="icon" type="image/png" sizes="192x192" href="https://vweacphuxfka531192.cdn.ntruss.com/images/favicon/android-icon-192x192.png"> | ||
21 | + <link rel="icon" type="image/png" sizes="32x32" href="https://vweacphuxfka531192.cdn.ntruss.com/images/favicon/favicon-32x32.png"> | ||
22 | + <link rel="icon" type="image/png" sizes="96x96" href="https://vweacphuxfka531192.cdn.ntruss.com/images/favicon/favicon-96x96.png"> | ||
23 | + <link rel="icon" type="image/png" sizes="16x16" href="https://vweacphuxfka531192.cdn.ntruss.com/images/favicon/favicon-16x16.png"> | ||
24 | + <link rel="shortcut icon" href="https://vweacphuxfka531192.cdn.ntruss.com/images/favicon/favicon.ico"/> | ||
25 | + <link rel="alternate" href="https://dak.gg/" hreflang="x-default"> | ||
26 | + <link rel="alternate" href="https://dak.gg/?hl=en" hreflang="en"> | ||
27 | + <link rel="alternate" href="https://dak.gg/?hl=ko" hreflang="ko"> | ||
28 | + <link rel="alternate" href="https://dak.gg/?hl=zh" hreflang="zh"> | ||
29 | + <link rel="alternate" href="https://dak.gg/?hl=ja" hreflang="ja"> | ||
30 | + <link rel="stylesheet" href="https://vweacphuxfka531192.cdn.ntruss.com/css/app.css?id=fe45405ceb37dc4f41fa"/> | ||
31 | + <script> | ||
32 | + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ||
33 | + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | ||
34 | + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | ||
35 | + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | ||
36 | + | ||
37 | + ga('create', 'UA-1625942-4', 'auto'); | ||
38 | + ga('send', 'pageview'); | ||
39 | + ga('send', 'event', 'locale', "ko"); | ||
40 | +</script> | ||
41 | + <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | ||
42 | +</head> | ||
43 | +<body class="ko frontpage"> | ||
44 | + <div id="fb-root"></div> | ||
45 | + <script>(function (d, s, id) { | ||
46 | + var js, fjs = d.getElementsByTagName(s)[0]; | ||
47 | + if (d.getElementById(id)) return; | ||
48 | + js = d.createElement(s); | ||
49 | + js.id = id; | ||
50 | + js.src = "//connect.facebook.net/ko_KR/sdk.js#xfbml=1&version=v2.10&appId=656372297891383"; | ||
51 | + fjs.parentNode.insertBefore(js, fjs); | ||
52 | + }(document, 'script', 'facebook-jssdk'));</script> | ||
53 | +<div id="wrapper"> | ||
54 | + <header class="alert-"> | ||
55 | + <div class="container"> | ||
56 | + <a href="/" class="logo"> | ||
57 | + | ||
58 | + <img src="https://klas.khu.ac.kr/webdata/ko/images/main/h1_klas_logo.gif" | ||
59 | + alt="DAK.GG"> | ||
60 | + </a> | ||
61 | + | ||
62 | + | ||
63 | + <div class="locale"> | ||
64 | + | ||
65 | + | ||
66 | + </div> | ||
67 | + | ||
68 | + | ||
69 | + </div> | ||
70 | + | ||
71 | + </header> | ||
72 | + | ||
73 | + <div id="container"> | ||
74 | + <div id="frontPage"> | ||
75 | + <div class="panel-left"> | ||
76 | + <form action="/search.php" class="search"> | ||
77 | + | ||
78 | + <input type="text" name="name" value="" required placeholder="배틀그라운드 닉네임을 입력하세요" style="padding-left: 30px;"/> | ||
79 | + <button type="submit"> | ||
80 | + <i class="glyphicon glyphicon-search"></i> | ||
81 | + </button> | ||
82 | + </form> | ||
83 | + | ||
84 | + </div> | ||
85 | + | ||
86 | + </div> | ||
87 | + </div> | ||
88 | + | ||
89 | + <footer> | ||
90 | + <div class="container"> | ||
91 | + <div class="locale"> | ||
92 | + <a href="#" data-lang="ko"> | ||
93 | + <img src="https://vweacphuxfka531192.cdn.ntruss.com/images/icons/flags/kr.png" alt="한국 국기"> | ||
94 | + <span>한국어</span> | ||
95 | + <i class="glyphicon glyphicon-triangle-bottom"></i> | ||
96 | + </a> | ||
97 | + | ||
98 | + | ||
99 | +</div> | ||
100 | + | ||
101 | + <div class="copyright"> | ||
102 | + <p> | ||
103 | + © DAK.GG. All Rights Reserved. | ||
104 | + </p> | ||
105 | + </div> | ||
106 | + </div> | ||
107 | + </footer> | ||
108 | +</div> | ||
109 | +<script type="text/javascript" src="https://vweacphuxfka531192.cdn.ntruss.com/js/manifest.js?id=98ab2789116a6196d1bc"></script> | ||
110 | +<script type="text/javascript" src="https://vweacphuxfka531192.cdn.ntruss.com/js/vendor.js?id=1ce605d2ddfe3b4573cc"></script> | ||
111 | +<script type="text/javascript" src="https://vweacphuxfka531192.cdn.ntruss.com/js/app.js?id=cf60bd4115d3787f16e3"></script> | ||
112 | +<script type="application/ld+json">{"@context":"http:\/\/schema.org","@type":"Organization","name":"\ubc30\ud2c0\uadf8\ub77c\uc6b4\ub4dc \uc804\uc801\uac80\uc0c9 - \ub2e5\uc9c0\uc9c0","url":"https:\/\/dak.gg","sameAs":["https:\/\/www.facebook.com\/PubgDAKGG\/","http:\/\/blog.naver.com\/dakgg_"]}</script> | ||
113 | +<script>!function(e,o,n){window.HSCW=o,window.HS=n,n.beacon=n.beacon||{};var t=n.beacon;t.userConfig={},t.readyQueue=[],t.config=function(e){this.userConfig=e},t.ready=function(e){this.readyQueue.push(e)},o.config={docs:{enabled:!1,baseUrl:""},contact:{enabled:!0,formId:"ef2419b8-916c-11e7-b466-0ec85169275a"}};var r=e.getElementsByTagName("script")[0],c=e.createElement("script");c.type="text/javascript",c.async=!0,c.src="https://djtflbt20bdde.cloudfront.net/",r.parentNode.insertBefore(c,r)}(document,window.HSCW||{},window.HS||{});</script> | ||
114 | + | ||
115 | + | ||
116 | +<script>HS.beacon.config({ color: '#32a8d9', icon:'message', poweredBy: false, showSubject: true, | ||
117 | + instructions: '사이트 기능 제안, 버그 신고, 기타 의견을 남겨주세요.', translation: { | ||
118 | + emailLabel:'이메일 주소', | ||
119 | + emailError:'올바른 이메일 주소를 입력해 주십시오.', | ||
120 | + messageLabel:'내용', | ||
121 | + messageError:'내용을 남겨주세요.', | ||
122 | + sendLabel:'보내기', | ||
123 | + contactSuccessLabel:'전송 완료!', | ||
124 | + contactSuccessDescription:'의견을 남겨주셔서 감사합니다! 답변이 가능한 내용일 경우 적어주신 이메일로 회신드리겠습니다.', | ||
125 | + fileExtensionError:'허용되지 않는 첨부 파일 형식입니다.', | ||
126 | + attachFileError:'최대 10MB까지만 첨부할 수 있습니다.', | ||
127 | + attachFileLabel:'파일 첨부', | ||
128 | + contactLabel:'메시지 전송', | ||
129 | + subjectLabel: '제목', | ||
130 | + subjectError: '제목을 적어주세요.' | ||
131 | +}});</script> | ||
132 | + | ||
133 | +<script type="text/javascript" src="//wcs.naver.net/wcslog.js"></script> | ||
134 | +<script type="text/javascript">if (!wcs_add) var wcs_add = {}; wcs_add["wa"] = "2be7ca218d2cf0"; wcs_do();</script> | ||
135 | + | ||
136 | +</body> | ||
137 | +</html> |
search.php
0 → 100644
1 | +<? | ||
2 | +// http://override1592.tistory.com/20 | ||
3 | +// 소개 글 | ||
4 | + | ||
5 | +// http://dovetail.tistory.com/38 | ||
6 | +// //스누피 크롤링 | ||
7 | +// https://discussion.developer.riotgames.com/questions/4188/request-api.html | ||
8 | +// https://discussion.developer.riotgames.com/articles/61/public-libraries-for-the-riot-games-api.html | ||
9 | + | ||
10 | +?> | ||
11 | + | ||
12 | +<!DOCTYPE > | ||
13 | +<html> | ||
14 | +<head> | ||
15 | +<link rel='stylesheet' type='text/css' href='http://www.blueb.co.kr/data/201010/IJ12872423858253/fullcalendar.css' /> | ||
16 | +<script type='text/javascript' src='http://www.blueb.co.kr/data/201010/IJ12872423858253/jquery.js'></script> | ||
17 | +<script type='text/javascript' src='http://www.blueb.co.kr/data/201010/IJ12872423858253/jquery-ui-custom.js'></script> | ||
18 | +<script type='text/javascript' src='http://www.blueb.co.kr/data/201010/IJ12872423858253/fullcalendar.min.js'></script> | ||
19 | +<script type='text/javascript'> | ||
20 | + | ||
21 | + $(document).ready(function() { | ||
22 | + | ||
23 | + var date = new Date(); | ||
24 | + var d = date.getDate(); | ||
25 | + var m = date.getMonth(); | ||
26 | + var y = date.getFullYear(); | ||
27 | + | ||
28 | + $('#calendar').fullCalendar({ | ||
29 | + header: { | ||
30 | + left: 'prev,next today', | ||
31 | + center: 'title', | ||
32 | + right: 'month,basicWeek,basicDay' | ||
33 | + }, | ||
34 | + editable: true, | ||
35 | + events: [ | ||
36 | + | ||
37 | + <?php | ||
38 | + | ||
39 | + //python | ||
40 | + $command = escapeshellcmd('test.py'); | ||
41 | + $output = shell_exec($command); | ||
42 | + | ||
43 | + //mysql | ||
44 | + $host = 'localhost'; | ||
45 | + $user = 'root'; | ||
46 | + $pw = 'autoset'; | ||
47 | + $dbname = 'lol'; | ||
48 | + | ||
49 | + $conn = mysqli_connect($host, $user, $pw, $dbname); | ||
50 | + | ||
51 | + $sql2 = "select count(day) from gametime"; | ||
52 | + $result2=mysqli_query($conn,$sql2); | ||
53 | + $data2 = array(); | ||
54 | + $row2=mysqli_fetch_array($result2); | ||
55 | + echo $row2[0]; | ||
56 | + | ||
57 | + $sql="select * from gametime"; | ||
58 | + | ||
59 | + | ||
60 | + $result=mysqli_query($conn,$sql); | ||
61 | + $data = array(); | ||
62 | + $cnt = 0; | ||
63 | + if($result){ | ||
64 | + | ||
65 | + while($row=mysqli_fetch_array($result)){ | ||
66 | + array_push($data, array('day'=>$row[0], 'time'=>$row[1] )); | ||
67 | + $row_arr = explode('-', $row[0]); | ||
68 | + ?> | ||
69 | + | ||
70 | + | ||
71 | + { | ||
72 | + title: 'Long Event', | ||
73 | + start: new Date(y, <?php echo $row_arr[1];?>, <?php echo $row_arr[2];?>), | ||
74 | + allDay: false | ||
75 | + } | ||
76 | + | ||
77 | + <?php $cnt++; if ( $cnt != $row[0] ) { echo ","; }?> | ||
78 | + <?php} //while | ||
79 | + } //if ?> | ||
80 | + | ||
81 | + | ||
82 | + | ||
83 | + // { | ||
84 | + // title: 'Long Event', | ||
85 | + // start: new Date(y, m, 2), | ||
86 | + // end: new Date(y, m, 3) | ||
87 | + // }, | ||
88 | + // { | ||
89 | + // id: 999, | ||
90 | + // title: 'Repeating Event', | ||
91 | + // start: new Date(y, m, d-3, 16, 0), | ||
92 | + // allDay: false | ||
93 | + // }, | ||
94 | + // { | ||
95 | + // title: 'All Day Event', | ||
96 | + // start: new Date(y, m, 1) | ||
97 | + // }, | ||
98 | + // { | ||
99 | + // title: 'Long Event', | ||
100 | + // start: new Date(y, m, 2), | ||
101 | + // end: new Date(y, m, 3) | ||
102 | + // }, | ||
103 | + // { | ||
104 | + // id: 999, | ||
105 | + // title: 'Repeating Event', | ||
106 | + // start: new Date(y, m, d-3, 16, 0), | ||
107 | + // allDay: false | ||
108 | + // }, | ||
109 | + // { | ||
110 | + // id: 999, | ||
111 | + // title: 'Repeating Event', | ||
112 | + // start: new Date(y, m, d+4, 16, 0), | ||
113 | + // allDay: false | ||
114 | + // }, | ||
115 | + // { | ||
116 | + // title: 'Meeting', | ||
117 | + // start: new Date(y, m, d, 10, 30), | ||
118 | + // allDay: false | ||
119 | + // }, | ||
120 | + // { | ||
121 | + // title: 'Lunch', | ||
122 | + // start: new Date(y, m, d, 12, 0), | ||
123 | + // end: new Date(y, m, d, 14, 0), | ||
124 | + // allDay: false | ||
125 | + // }, | ||
126 | + // { | ||
127 | + // title: 'Birthday Party', | ||
128 | + // start: new Date(y, m, d+1, 19, 0), | ||
129 | + // end: new Date(y, m, d+1, 22, 30), | ||
130 | + // allDay: false | ||
131 | + // }, | ||
132 | + // { | ||
133 | + // title: 'Click for Google', | ||
134 | + // start: new Date(y, m, 28), | ||
135 | + // end: new Date(y, m, 29), | ||
136 | + // url: 'http://google.com/' | ||
137 | + // } | ||
138 | + ] | ||
139 | + }); | ||
140 | + | ||
141 | + }); | ||
142 | + | ||
143 | +</script> | ||
144 | +<script type='text/javascript'> | ||
145 | + | ||
146 | +function httpGet($url) | ||
147 | +{ | ||
148 | + $ch = curl_init(); | ||
149 | + curl_setopt($ch,CURLOPT_URL,$url); | ||
150 | + curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); | ||
151 | + // curl_setopt($ch,CURLOPT_HEADER, false); | ||
152 | + $output=curl_exec($ch); | ||
153 | + curl_close($ch); | ||
154 | + return $output; | ||
155 | +} | ||
156 | + | ||
157 | +</script> | ||
158 | +<style type='text/css'> | ||
159 | + | ||
160 | + body { | ||
161 | + margin-top: 40px; | ||
162 | + text-align: center; | ||
163 | + font-size: 14px; | ||
164 | + font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif; | ||
165 | + } | ||
166 | + | ||
167 | + #calendar { | ||
168 | + width: 900px; | ||
169 | + margin: 0 auto; | ||
170 | + } | ||
171 | + | ||
172 | +</style> | ||
173 | +</head> | ||
174 | +<body> | ||
175 | + | ||
176 | + <?php | ||
177 | + $api_key = "RGAPI-eb66d6f1-a940-4ded-8679-9554c559ad75"; // 자신의 api_key | ||
178 | + $usernames = strtolower(trim("abc")); | ||
179 | + $username = "바사노바";//preg_replace("/\s+/", "", $usernames); | ||
180 | + | ||
181 | + $url = "https://kr.api.riotgames.com/lol/summoner/v3/summoners/by-name/".$username."?api_key=".$api_key ; | ||
182 | + | ||
183 | + | ||
184 | + $ch = curl_init(); | ||
185 | + curl_setopt($ch,CURLOPT_URL,$url); | ||
186 | + curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); | ||
187 | + $output=curl_exec($ch); | ||
188 | + curl_close($ch); | ||
189 | + | ||
190 | + | ||
191 | + $get_id = json_decode($output, true); | ||
192 | + $userid = $get_id[$username]['id']; // ID | ||
193 | + $nick = $get_id[$username]['name']; // 닉네임 | ||
194 | + $level = $get_id[$username]['summonerLevel']; // 레벨 | ||
195 | + $profileIcon = $get_id[$username]['profileIconId']; // 프로필아이콘번호 | ||
196 | + echo $userid; | ||
197 | + // | ||
198 | + // $status = json_decode(httpGet("https://kr.api.pvp.net/api/lol/kr/v2.5/league/by-summoner/".$userid."/entry?api_key=".$api_key), true); | ||
199 | + // $tier = $status[$userid][0]['tier']; // 티어 | ||
200 | + // $division = $status[$userid][0]['entries'][0]['division']; // 상세 티어 | ||
201 | + // $point = $status[$userid][0]['entries'][0]['leaguePoints']; // 리그포인트 | ||
202 | + // $win = $status[$userid][0]['entries'][0]['wins']; // 승 | ||
203 | + // $lose = $status[$userid][0]['entries'][0]['losses']; // 패 | ||
204 | + | ||
205 | + ?> | ||
206 | + | ||
207 | + | ||
208 | + <div id='calendar'></div> | ||
209 | + | ||
210 | + | ||
211 | +</body> | ||
212 | +</html> |
test.py
0 → 100644
1 | +#-*- coding:utf -8 -*- | ||
2 | +import urllib | ||
3 | +from bs4 import BeautifulSoup | ||
4 | +fp = urllib.urlopen("http://www.op.gg/summoner/userName=abc") | ||
5 | +source = fp.read() | ||
6 | +fp.close() | ||
7 | + | ||
8 | +soup = BeautifulSoup(source,"lxml") | ||
9 | + | ||
10 | +table = soup.find_all("div","TimeStamp") | ||
11 | +i = 0; | ||
12 | +while i< len(table ): | ||
13 | + print table[i].string | ||
14 | + i = i+1; | ||
15 | + | ||
16 | + | ||
17 | +#SummonerLayoutContent > div.tabItem.Content.SummonerLayoutContent.summonerLayout-summary > div.RealContent > div > div.Content > div:nth-child(3) > div:nth-child(1) > div > div.Content > div.GameStats > div.TimeStamp > span | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment