Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- BOF
- 파이썬
- php
- hackthissite
- Javascript
- BOF 원정대
- HTTP
- c++
- Web
- c
- Linux
- Python
- backend
- 러닝스칼라
- 포인터
- deep learning
- 리눅스
- 명령어
- Scala
- hacking
- mysql
- hackerschool
- 웹해킹
- 러닝 스칼라
- webhacking
- Shellcode
- 백엔드
- fedora
- flask
- Class
- Today
- 21
- Total
- 129,328
jam 블로그
[php] 웹에서 안드로이드 앱버전 가져오기. 본문
반응형
<?php $url = "";//앱 마켓 주소. header('Content-Type: text/html; charset=utf-8'); $curl = curl_init(); $timeout = 0; // 0으로 하면 시간제한이 없다. curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); $buffer = curl_exec($curl); curl_close($curl); preg_match_all("/softwareVersion\">(.*)([0-9]+\.[0-9]+\.[0-9]+)/",$buffer,$filter); echo trim($filter[2][0]); ?>url에 앱 마켓 주소를 넣으면 그 앱의 버전이 나옵니다.
출력 결과는 1.1.0 이런식으로 나옵니다.
'개발 및 관련 자료 > HTML&CSS&Javascript' 카테고리의 다른 글
[HTML] How to fix video tag using amazon s3 in ie 9 or ie 10 (0) | 2016.06.19 |
---|---|
[javascript] form 타입을 json으로 변형하기 (0) | 2014.07.21 |
[php] 웹에서 안드로이드 앱버전 가져오기. (0) | 2014.01.16 |
[html] 한글 줄바꿈 방법 (0) | 2013.11.06 |
[jquery] iframe 페이지 reload 하기. (0) | 2013.07.11 |
[javascript] jQuery 1.5 이상에서 ajaxfileupload.js 사용시 오류 수정방법. (0) | 2013.04.11 |
0 Comments