Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박주현
/
2017_02_OSS_project
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박주현
2017-12-03 22:23:11 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
98eefb261b9973b39df5ff2ef468c8cd6bbadbd8
98eefb26
0 parents
20171202
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
366 additions
and
0 deletions
index.php
search.php
test.py
index.php
0 → 100644
View file @
98eefb2
<html
lang=
"ko"
>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, user-scalable=no"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
name=
"csrf-token"
content=
"owQv0CqogJqcTArsapNyHqtzQ04HfPAE6e92x2qu"
>
<title>
또 게임해? 배틀그라운드 전적검색
</title>
<meta
name=
"description"
content=
"배그 전적검색, 카카오 서버, 레이팅, 순위표, 대회, 랭킹, 로그, 인벤, 서버, 장애, 점검, OP.GG"
>
<meta
name=
"keywords"
content=
"배그, 배그전적, 배그전적검색, 배틀그라운드 전적검색 사이트, 닥지지, 순위표, ESL, 대회, 게임스컴, 리더보드, 랭킹, 통계, 레이팅, 스탯, 로그, 승률, 킬뎃, 딜량, 디스코드, 핵쟁이, 서버, 장애, 점검, 인벤, OP.GG"
>
<meta
property=
"og:title"
content=
"배틀그라운드 전적검색 - 닥지지"
/>
<meta
property=
"og:description"
content=
"배그 전적검색, 카카오 서버, 레이팅, 순위표, 대회, 랭킹, 로그, 인벤, 서버, 장애, 점검, OP.GG"
/>
<meta
property=
"og:type"
content=
"website"
/>
<meta
property=
"og:url"
content=
"https://dak.gg/"
/>
<meta
property=
"og:image"
content=
"https://vweacphuxfka531192.cdn.ntruss.com/images/og_title_dakgg.png"
/>
<meta
property=
"og:site_name"
content=
"배틀그라운드 전적검색 - 닥지지"
/>
<meta
property=
"twitter:image"
content=
"https://vweacphuxfka531192.cdn.ntruss.com/images/og_title_dakgg.png"
/>
<link
rel=
"canonical"
href=
"https://dak.gg/"
/>
<link
rel=
"icon"
type=
"image/png"
sizes=
"192x192"
href=
"https://vweacphuxfka531192.cdn.ntruss.com/images/favicon/android-icon-192x192.png"
>
<link
rel=
"icon"
type=
"image/png"
sizes=
"32x32"
href=
"https://vweacphuxfka531192.cdn.ntruss.com/images/favicon/favicon-32x32.png"
>
<link
rel=
"icon"
type=
"image/png"
sizes=
"96x96"
href=
"https://vweacphuxfka531192.cdn.ntruss.com/images/favicon/favicon-96x96.png"
>
<link
rel=
"icon"
type=
"image/png"
sizes=
"16x16"
href=
"https://vweacphuxfka531192.cdn.ntruss.com/images/favicon/favicon-16x16.png"
>
<link
rel=
"shortcut icon"
href=
"https://vweacphuxfka531192.cdn.ntruss.com/images/favicon/favicon.ico"
/>
<link
rel=
"alternate"
href=
"https://dak.gg/"
hreflang=
"x-default"
>
<link
rel=
"alternate"
href=
"https://dak.gg/?hl=en"
hreflang=
"en"
>
<link
rel=
"alternate"
href=
"https://dak.gg/?hl=ko"
hreflang=
"ko"
>
<link
rel=
"alternate"
href=
"https://dak.gg/?hl=zh"
hreflang=
"zh"
>
<link
rel=
"alternate"
href=
"https://dak.gg/?hl=ja"
hreflang=
"ja"
>
<link
rel=
"stylesheet"
href=
"https://vweacphuxfka531192.cdn.ntruss.com/css/app.css?id=fe45405ceb37dc4f41fa"
/>
<script>
(
function
(
i
,
s
,
o
,
g
,
r
,
a
,
m
){
i
[
'GoogleAnalyticsObject'
]
=
r
;
i
[
r
]
=
i
[
r
]
||
function
(){
(
i
[
r
].
q
=
i
[
r
].
q
||
[]).
push
(
arguments
)},
i
[
r
].
l
=
1
*
new
Date
();
a
=
s
.
createElement
(
o
),
m
=
s
.
getElementsByTagName
(
o
)[
0
];
a
.
async
=
1
;
a
.
src
=
g
;
m
.
parentNode
.
insertBefore
(
a
,
m
)
})(
window
,
document
,
'script'
,
'https://www.google-analytics.com/analytics.js'
,
'ga'
);
ga
(
'create'
,
'UA-1625942-4'
,
'auto'
);
ga
(
'send'
,
'pageview'
);
ga
(
'send'
,
'event'
,
'locale'
,
"ko"
);
</script>
<script
async
src=
"//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"
></script>
</head>
<body
class=
"ko frontpage"
>
<div
id=
"fb-root"
></div>
<script>
(
function
(
d
,
s
,
id
)
{
var
js
,
fjs
=
d
.
getElementsByTagName
(
s
)[
0
];
if
(
d
.
getElementById
(
id
))
return
;
js
=
d
.
createElement
(
s
);
js
.
id
=
id
;
js
.
src
=
"//connect.facebook.net/ko_KR/sdk.js#xfbml=1&version=v2.10&appId=656372297891383"
;
fjs
.
parentNode
.
insertBefore
(
js
,
fjs
);
}(
document
,
'script'
,
'facebook-jssdk'
));
</script>
<div
id=
"wrapper"
>
<header
class=
"alert-"
>
<div
class=
"container"
>
<a
href=
"/"
class=
"logo"
>
<img
src=
"https://klas.khu.ac.kr/webdata/ko/images/main/h1_klas_logo.gif"
alt=
"DAK.GG"
>
</a>
<div
class=
"locale"
>
</div>
</div>
</header>
<div
id=
"container"
>
<div
id=
"frontPage"
>
<div
class=
"panel-left"
>
<form
action=
"/search.php"
class=
"search"
>
<input
type=
"text"
name=
"name"
value=
""
required
placeholder=
"배틀그라운드 닉네임을 입력하세요"
style=
"padding-left: 30px;"
/>
<button
type=
"submit"
>
<i
class=
"glyphicon glyphicon-search"
></i>
</button>
</form>
</div>
</div>
</div>
<footer>
<div
class=
"container"
>
<div
class=
"locale"
>
<a
href=
"#"
data-lang=
"ko"
>
<img
src=
"https://vweacphuxfka531192.cdn.ntruss.com/images/icons/flags/kr.png"
alt=
"한국 국기"
>
<span>
한국어
</span>
<i
class=
"glyphicon glyphicon-triangle-bottom"
></i>
</a>
</div>
<div
class=
"copyright"
>
<p>
© DAK.GG. All Rights Reserved.
</p>
</div>
</div>
</footer>
</div>
<script
type=
"text/javascript"
src=
"https://vweacphuxfka531192.cdn.ntruss.com/js/manifest.js?id=98ab2789116a6196d1bc"
></script>
<script
type=
"text/javascript"
src=
"https://vweacphuxfka531192.cdn.ntruss.com/js/vendor.js?id=1ce605d2ddfe3b4573cc"
></script>
<script
type=
"text/javascript"
src=
"https://vweacphuxfka531192.cdn.ntruss.com/js/app.js?id=cf60bd4115d3787f16e3"
></script>
<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>
<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>
<script>
HS
.
beacon
.
config
({
color
:
'#32a8d9'
,
icon
:
'message'
,
poweredBy
:
false
,
showSubject
:
true
,
instructions
:
'사이트 기능 제안, 버그 신고, 기타 의견을 남겨주세요.'
,
translation
:
{
emailLabel
:
'이메일 주소'
,
emailError
:
'올바른 이메일 주소를 입력해 주십시오.'
,
messageLabel
:
'내용'
,
messageError
:
'내용을 남겨주세요.'
,
sendLabel
:
'보내기'
,
contactSuccessLabel
:
'전송 완료!'
,
contactSuccessDescription
:
'의견을 남겨주셔서 감사합니다! 답변이 가능한 내용일 경우 적어주신 이메일로 회신드리겠습니다.'
,
fileExtensionError
:
'허용되지 않는 첨부 파일 형식입니다.'
,
attachFileError
:
'최대 10MB까지만 첨부할 수 있습니다.'
,
attachFileLabel
:
'파일 첨부'
,
contactLabel
:
'메시지 전송'
,
subjectLabel
:
'제목'
,
subjectError
:
'제목을 적어주세요.'
}});
</script>
<script
type=
"text/javascript"
src=
"//wcs.naver.net/wcslog.js"
></script>
<script
type=
"text/javascript"
>
if
(
!
wcs_add
)
var
wcs_add
=
{};
wcs_add
[
"wa"
]
=
"2be7ca218d2cf0"
;
wcs_do
();
</script>
</body>
</html>
search.php
0 → 100644
View file @
98eefb2
<?
// http://override1592.tistory.com/20
// 소개 글
// http://dovetail.tistory.com/38
// //스누피 크롤링
// https://discussion.developer.riotgames.com/questions/4188/request-api.html
// https://discussion.developer.riotgames.com/articles/61/public-libraries-for-the-riot-games-api.html
?>
<!DOCTYPE >
<html>
<head>
<link
rel=
'stylesheet'
type=
'text/css'
href=
'http://www.blueb.co.kr/data/201010/IJ12872423858253/fullcalendar.css'
/>
<script
type=
'text/javascript'
src=
'http://www.blueb.co.kr/data/201010/IJ12872423858253/jquery.js'
></script>
<script
type=
'text/javascript'
src=
'http://www.blueb.co.kr/data/201010/IJ12872423858253/jquery-ui-custom.js'
></script>
<script
type=
'text/javascript'
src=
'http://www.blueb.co.kr/data/201010/IJ12872423858253/fullcalendar.min.js'
></script>
<script
type=
'text/javascript'
>
$(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
editable: true,
events: [
<?php
//python
$command
=
escapeshellcmd
(
'test.py'
);
$output
=
shell_exec
(
$command
);
//mysql
$host
=
'localhost'
;
$user
=
'root'
;
$pw
=
'autoset'
;
$dbname
=
'lol'
;
$conn
=
mysqli_connect
(
$host
,
$user
,
$pw
,
$dbname
);
$sql2
=
"select count(day) from gametime"
;
$result2
=
mysqli_query
(
$conn
,
$sql2
);
$data2
=
array
();
$row2
=
mysqli_fetch_array
(
$result2
);
echo
$row2
[
0
];
$sql
=
"select * from gametime"
;
$result
=
mysqli_query
(
$conn
,
$sql
);
$data
=
array
();
$cnt
=
0
;
if
(
$result
){
while
(
$row
=
mysqli_fetch_array
(
$result
)){
array_push
(
$data
,
array
(
'day'
=>
$row
[
0
],
'time'
=>
$row
[
1
]
));
$row_arr
=
explode
(
'-'
,
$row
[
0
]);
?>
{
title: 'Long Event',
start: new Date(y,
<?php
echo
$row_arr
[
1
];
?>
,
<?php
echo
$row_arr
[
2
];
?>
),
allDay: false
}
<?php
$cnt
++
;
if
(
$cnt
!=
$row
[
0
]
)
{
echo
","
;
}
?>
<?php
}
//while
}
//if ?>
// {
// title: 'Long Event',
// start: new Date(y, m, 2),
// end: new Date(y, m, 3)
// },
// {
// id: 999,
// title: 'Repeating Event',
// start: new Date(y, m, d-3, 16, 0),
// allDay: false
// },
// {
// title: 'All Day Event',
// start: new Date(y, m, 1)
// },
// {
// title: 'Long Event',
// start: new Date(y, m, 2),
// end: new Date(y, m, 3)
// },
// {
// id: 999,
// title: 'Repeating Event',
// start: new Date(y, m, d-3, 16, 0),
// allDay: false
// },
// {
// id: 999,
// title: 'Repeating Event',
// start: new Date(y, m, d+4, 16, 0),
// allDay: false
// },
// {
// title: 'Meeting',
// start: new Date(y, m, d, 10, 30),
// allDay: false
// },
// {
// title: 'Lunch',
// start: new Date(y, m, d, 12, 0),
// end: new Date(y, m, d, 14, 0),
// allDay: false
// },
// {
// title: 'Birthday Party',
// start: new Date(y, m, d+1, 19, 0),
// end: new Date(y, m, d+1, 22, 30),
// allDay: false
// },
// {
// title: 'Click for Google',
// start: new Date(y, m, 28),
// end: new Date(y, m, 29),
// url: 'http://google.com/'
// }
]
});
});
</
script
>
<
script
type
=
'text/javascript'
>
function
httpGet
(
$url
)
{
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
true
);
// curl_setopt($ch,CURLOPT_HEADER, false);
$output
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
return
$output
;
}
</
script
>
<
style
type
=
'text/css'
>
body
{
margin
-
top
:
40
px
;
text
-
align
:
center
;
font
-
size
:
14
px
;
font
-
family
:
"Lucida Grande"
,
Helvetica
,
Arial
,
Verdana
,
sans
-
serif
;
}
#calendar {
width
:
900
px
;
margin
:
0
auto
;
}
</
style
>
</
head
>
<
body
>
<?
php
$api_key
=
"RGAPI-eb66d6f1-a940-4ded-8679-9554c559ad75"
;
// 자신의 api_key
$usernames
=
strtolower
(
trim
(
"abc"
));
$username
=
"바사노바"
;
//preg_replace("/\s+/", "", $usernames);
$url
=
"https://kr.api.riotgames.com/lol/summoner/v3/summoners/by-name/"
.
$username
.
"?api_key="
.
$api_key
;
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
true
);
$output
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
$get_id
=
json_decode
(
$output
,
true
);
$userid
=
$get_id
[
$username
][
'id'
];
// ID
$nick
=
$get_id
[
$username
][
'name'
];
// 닉네임
$level
=
$get_id
[
$username
][
'summonerLevel'
];
// 레벨
$profileIcon
=
$get_id
[
$username
][
'profileIconId'
];
// 프로필아이콘번호
echo
$userid
;
//
// $status = json_decode(httpGet("https://kr.api.pvp.net/api/lol/kr/v2.5/league/by-summoner/".$userid."/entry?api_key=".$api_key), true);
// $tier = $status[$userid][0]['tier']; // 티어
// $division = $status[$userid][0]['entries'][0]['division']; // 상세 티어
// $point = $status[$userid][0]['entries'][0]['leaguePoints']; // 리그포인트
// $win = $status[$userid][0]['entries'][0]['wins']; // 승
// $lose = $status[$userid][0]['entries'][0]['losses']; // 패
?>
<div id='calendar'></div>
</body>
</html>
test.py
0 → 100644
View file @
98eefb2
#-*- coding:utf -8 -*-
import
urllib
from
bs4
import
BeautifulSoup
fp
=
urllib
.
urlopen
(
"http://www.op.gg/summoner/userName=abc"
)
source
=
fp
.
read
()
fp
.
close
()
soup
=
BeautifulSoup
(
source
,
"lxml"
)
table
=
soup
.
find_all
(
"div"
,
"TimeStamp"
)
i
=
0
;
while
i
<
len
(
table
):
print
table
[
i
]
.
string
i
=
i
+
1
;
#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
Please
register
or
login
to post a comment