Search Results for 'search'


108 posts related to 'search'

  1. 2021/01/22 택배사 배송추적 URL(주소) 모음 - 리스트 2
  2. 2021/01/13 AnyTXT Searcher 1.2.382 - 윈도우 텍스트 문서 검색
  3. 2020/08/12 안드로이드 ADB 비행기모드 On/Off
  4. 2020/06/25 mysql my.cnf 내용 설명 정리
  5. 2019/10/30 파이썬을 이용한 머신러닝, 딥러닝 실전 개발 입문
  6. 2019/04/12 CURL 사용법
  7. 2018/08/19 네이버 사이트 품질 가이드
  8. 2018/08/07 네이버 openapi 사용하여 쇼핑검색 만들기
  9. 2018/08/04 Atomic Email Hunter 14.4.0.371 ( Multilingual ) - 메일 수집 발송 프로그램
  10. 2018/08/03 생성함수 - 배열 중간에 값 제거
  11. 2018/08/03 SEO 검색엔진 상위리스트 올리기
  12. 2018/07/25 브라우저 Agent 정보
  13. 2018/07/25 그누보드에서 자주사용하는 php함수모음
  14. 2017/04/27 귀농 귀촌 시골땅 시골집매매 시골빈집매매 촌집매매 오지땅 임야매매 매매 직거래 시골산 가격 시세 장터 사이트 추천
  15. 2017/02/20 INPUT TYPE
  16. 2012/11/02 Piwik(Open source web analytics) 네이버 한글 문제
  17. 2012/09/16 빠른 파일 검색 프로그램 - Everything
  18. 2012/07/23 InStr 함수로 문자열 찾기
  19. 2012/07/20 웹에서 불가능한 것을 가능케 하는 WebdriverJS
  20. 2012/02/07 PHP에서 홑따움표 검색처리 1
  21. 2012/01/02 ASP 해킹 방지 보안 방법(injection, cross site scripting...)
  22. 2011/12/06 레이어 공지사항(오늘 하루 그만 보기)
  23. 2011/12/06 Intent에서 앱 호출하는 방법 정리
  24. 2011/12/06 Intent 활용 예제 소스
  25. 2011/12/06 Intent 활용 예제
  26. 2011/12/06 안드로이드 apk decompile 하기 완결판 - APK 디컴파일 하기 JAVA
  27. 2011/12/06 원격서버의 Virtualbox 의 웹관리툴 Phpvirtualbox 관련 삽질
  28. 2011/11/23 유용한 ASP소스
  29. 2011/11/09 입력한 내용에 맞는 체크박스만 보여주기
  30. 2011/10/24 토렌트 검색기 소스

0 comments related to 'search'

우체국택배 http://service.epost.go.kr/trace.RetrieveRegiPrclDeliv.postal?sid1=송장번호

CJ대한통운택배https://www.doortodoor.co.kr/parcel/doortodoor.do?
fsp_action=PARC_ACT_002&fsp_cmd=retrieveInvNoACT&invc_no=송장번호

현대택배 http://www.hlc.co.kr/hydex/jsp/tracking/trackingViewCus.jsp?InvNo=송장번호

한진택배 http://www.hanjin.co.kr/Delivery_html/inquiry/result_waybill.jsp?wbl_num=송장번호

로젠택배 http://d2d.ilogen.com/d2d/delivery/invoice_tracesearch_quick.jsp?slipno=송장번호

동부익스프레스택배 http://www.dongbups.com/newHtml/delivery/dvsearch.jsp?mode=SEARCH&search_type=1&sellNum=Y&search_item_no=송장번호

옐로우캡 http://www.yellowcap.co.kr/custom/inquiry_result.asp?invoice_no=송장번호

경동택배 http://kdexp.com/sub3_shipping.asp?stype=1&yy=&mm=&p_item=송장번호

대신택배 http://home.daesinlogistics.co.kr/daesin/jsp/d_freight_chase/d_general_process2.jsp?billno1=송장번호

이노지스택배 http://www.innogis.net/trace02.asp?invoice=송장번호

편의점택배 http://www.doortodoor.co.kr/jsp/cmn/TrackingCVS.jsp?pTdNo=송장번호

KGB 택배 http://www.kgbls.co.kr//sub5/trace.asp?f_slipno=송장번호

합동택배 http://www.hdexp.co.kr/parcel/order_result_t.asp?stype=1&p_item=송장번호

일양로지스 http://www.ilyanglogis.com/functionality/card_form_waybill.asp?hawb_no=송장번호

천일 택배 http://www.cyber1001.co.kr/kor/taekbae/HTrace.jsp?transNo=송장번호

용마로지스 http://yeis.yongmalogis.co.kr/trace/etrace_yongma.asp?OrdCode=송장번호

GTX로지스 http://www.gtxlogis.co.kr/tracking/default.asp?awblno=송장번호

고려 택배 http://www.klogis.kr/03_business/01_tracking_detail_bcno.asp?bcno=송장번호

다젠 http://www.dazen.co.kr/admin/search/trace_view.asp?buy_no=송장번호

퀵퀵닷컴 http://www.quickquick.com/q/MTrack.php?hawb=송장번호

2021/01/22 13:02 2021/01/22 13:02
AnyTXT Searcher는 로컬 디스크 Google 검색 엔진과 같은 강력한 로컬 문서 검색 애플리케이션입니다. 이상적인 무료 데스크톱 콘텐츠 전체 텍스트 검색 엔진입니다.

AnyTXT Searcher에는 다른 소프트웨어를 설치하지 않고 자주 사용하는 문서의 텍스트를 추출하는 강력한 문서 파싱 엔진이 내장되어 있으며, 내장 된 고속 인덱싱 시스템을 결합하여 텍스트의 메타 데이터를 저장합니다. AnyTXT Searcher로 컴퓨터에있는 모든 단어를 빠르게 찾을 수 있습니다. Windows 10, 8, 7, Vista, XP, 2008, 2012, 2016 등에서 완벽하게 작동합니다.



지원되는 형식

일반 텍스트 형식 (txt, cpp, html 등)
Microsoft Outlook (eml) (베타)
Microsoft Word (doc, docx)
Microsoft Excel (xls, xlsx)
Microsoft PowerPoint (ppt, pptx)
Portable Document Format (pdf) (베타)
eBook 형식 (mobi, epub 등)
WPS Office 형식 (wps, et, dps)
Microsoft Compiled HTML 도움말 (chm)
 
사용자 삽입 이미지사용자 삽입 이미지사용자 삽입 이미지


기능


Microsoft Office (doc, xls, ppt) 지원
Microsoft Office 2007 (docx, xlsx, pptx, docm, xlsm, docm) 지원
eBook (mobi, epub, chm, fb2) 지원
WPS Office (wps, et, dps) 지원
다국어 (중국어, 일본어, 한국어 포함) 문서 지원
전체 텍스트 검색
자동 동기화 색인
SSD 최적화
다국어 지원
AES256 암호화
빠른 색인
빠른 검색
2021/01/13 11:12 2021/01/13 11:12
adb shell settings put global airplane_mode_on 1
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
adb shell settings put global airplane_mode_on 0
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
adb shell settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE —ez state true

// 최초진입시
adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS;
adb shell input keyevent 19;
adb shell input keyevent 23;
adb shell input keyevent 22;
adb shell input keyevent 23;

// 끄기 // 켜기
adb shell input keyevent 23;input keyevent 22;input keyevent 23;

// 아래는 shell input keyevent 번호값
0 -->  "KEYCODE_UNKNOWN" 
1 -->  "KEYCODE_MENU" 
2 -->  "KEYCODE_SOFT_RIGHT" 
3 -->  "KEYCODE_HOME" 
4 -->  "KEYCODE_BACK" 
5 -->  "KEYCODE_CALL" 
6 -->  "KEYCODE_ENDCALL" 
7 -->  "KEYCODE_0" 
8 -->  "KEYCODE_1" 
9 -->  "KEYCODE_2" 
10 -->  "KEYCODE_3" 
11 -->  "KEYCODE_4" 
12 -->  "KEYCODE_5" 
13 -->  "KEYCODE_6" 
14 -->  "KEYCODE_7" 
15 -->  "KEYCODE_8" 
16 -->  "KEYCODE_9" 
17 -->  "KEYCODE_STAR" 
18 -->  "KEYCODE_POUND" 
19 -->  "KEYCODE_DPAD_UP" 
20 -->  "KEYCODE_DPAD_DOWN" 
21 -->  "KEYCODE_DPAD_LEFT" 
22 -->  "KEYCODE_DPAD_RIGHT" 
23 -->  "KEYCODE_DPAD_CENTER" 
24 -->  "KEYCODE_VOLUME_UP" 
25 -->  "KEYCODE_VOLUME_DOWN" 
26 -->  "KEYCODE_POWER" 
27 -->  "KEYCODE_CAMERA" 
28 -->  "KEYCODE_CLEAR" 
29 -->  "KEYCODE_A" 
30 -->  "KEYCODE_B" 
31 -->  "KEYCODE_C" 
32 -->  "KEYCODE_D" 
33 -->  "KEYCODE_E" 
34 -->  "KEYCODE_F" 
35 -->  "KEYCODE_G" 
36 -->  "KEYCODE_H" 
37 -->  "KEYCODE_I" 
38 -->  "KEYCODE_J" 
39 -->  "KEYCODE_K" 
40 -->  "KEYCODE_L" 
41 -->  "KEYCODE_M" 
42 -->  "KEYCODE_N" 
43 -->  "KEYCODE_O" 
44 -->  "KEYCODE_P" 
45 -->  "KEYCODE_Q" 
46 -->  "KEYCODE_R" 
47 -->  "KEYCODE_S" 
48 -->  "KEYCODE_T" 
49 -->  "KEYCODE_U" 
50 -->  "KEYCODE_V" 
51 -->  "KEYCODE_W" 
52 -->  "KEYCODE_X" 
53 -->  "KEYCODE_Y" 
54 -->  "KEYCODE_Z" 
55 -->  "KEYCODE_COMMA" 
56 -->  "KEYCODE_PERIOD" 
57 -->  "KEYCODE_ALT_LEFT" 
58 -->  "KEYCODE_ALT_RIGHT" 
59 -->  "KEYCODE_SHIFT_LEFT" 
60 -->  "KEYCODE_SHIFT_RIGHT" 
61 -->  "KEYCODE_TAB" 
62 -->  "KEYCODE_SPACE" 
63 -->  "KEYCODE_SYM" 
64 -->  "KEYCODE_EXPLORER" 
65 -->  "KEYCODE_ENVELOPE" 
66 -->  "KEYCODE_ENTER" 
67 -->  "KEYCODE_DEL" 
68 -->  "KEYCODE_GRAVE" 
69 -->  "KEYCODE_MINUS" 
70 -->  "KEYCODE_EQUALS" 
71 -->  "KEYCODE_LEFT_BRACKET" 
72 -->  "KEYCODE_RIGHT_BRACKET" 
73 -->  "KEYCODE_BACKSLASH" 
74 -->  "KEYCODE_SEMICOLON" 
75 -->  "KEYCODE_APOSTROPHE" 
76 -->  "KEYCODE_SLASH" 
77 -->  "KEYCODE_AT" 
78 -->  "KEYCODE_NUM" 
79 -->  "KEYCODE_HEADSETHOOK" 
80 -->  "KEYCODE_FOCUS" 
81 -->  "KEYCODE_PLUS" 
82 -->  "KEYCODE_MENU" 
83 -->  "KEYCODE_NOTIFICATION" 
84 -->  "KEYCODE_SEARCH" 
85 -->  "TAG_LAST_KEYCODE"
adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS & adb shell input keyevent 19 & adb shell input keyevent 23 & adb shell input keyevent 4

비행기모드 설정
adb shell settings put global airplane_mode_on 1
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true

비행기모드 해제
adb shell settings put global airplane_mode_on 0
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false

다른방법(토글)
adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS
adb shell input keyevent 23
adb shell input keyevent KEYCODE_TAB
adb shell input keyevent 23
adb shell input keyevent 3
2020/08/12 09:45 2020/08/12 09:45
my.cnf : The file has system variables for DB environment.
location of MariaDB SW in this docoment : /engn001/mysvc01/mariadb-10.0.26
location of my.cnf in this document: /engn001/mysvc01/MARIASVC/my.cnf
my.cnf sample



$ vi /engn001/mysvc01/MARIASVC/my.cnf
##---------------------------------------------------------------------------
## Author: YJ
## mysqld 데몬 프로세스 관련 설정들
##---------------------------------------------------------------------------
[mysqld]
core-file                                     # core dump 파일을 생성하도록 하기 위한 설정
user = mysvc01                                # MariaDB 엔진의 owner (user id) = DB를 실행시킬 OS 계정

port = 3306                                   # DB 포트
socket = /engn001/mysvc01/MARIASVC/mysqld.sock   # 소켓파일 경로(로컬서버 접속에 사용), 리모트 서버에는 ip와 port를 이용해서 TCP/IP 프로토콜로 접근
pid-file = /engn001/mysvc01/MARIASVC/mysqld.pid  # MariaDB 서버가 자신의 프로세스 ID를 기록하는 파일 경로 (유닉스 혹은 리눅스에서만 사용)

basedir = /engn001/mysvc01/mariadb-10.0.26    # MariaDB 엔진 경로
datadir = /data001/mysvc01/MARIASVC           # DB의 데이터가 생성될 기본 경로
tmpdir = /data001/mysvc01/tmpdir_MARIASVC     # 디스크에 임시테이블이 생성될 때 사용될 경로

#secure_file_priv = /tmp                      # LOAD_FILE() 함수 및 LOAD DATA 와 SELECT ... INTO OUTFILE 명령문이 특정 디렉토리에 있는 파일에서만 동작을 하도록 한정

##---------------------------------------------------------------------------
## Author: YJ
## Logging
##---------------------------------------------------------------------------
log-warnings = 3                            # 0 비활성화
                                            # 1 이상: 쿼리문 단위의 경고 내용까지 에러로그에 기록

log_output = FILE,TABLE                     # 로그 기록 유형 (파일과 테이블에 기록)
log-error = /logs001/mysvc01/MARIASVC/error/mysqld.err # 에러 로그파일 경로

general_log = OFF                           # 제너럴 로그 비활성화
                                            # DB에서 일어나는 모든 작업에 대한 로그를 남기게 되므로 필요할 때만 ON으로 설정해서 사용
general_log_file = /logs001/mysvc01/MARIASVC/general/mysvc01-general.log    # 제너럴 로그파일 경로

slow_query_log = ON                         # 느린 쿼리 기록 활성화
long_query_time = 0.5                       # 느린 쿼리의 기준 시간(초)
log-slow-verbosity = 'query_plan,innodb'
log_queries_not_using_indexes = OFF         # 인덱스를 사용하지 않은 쿼리 기록 여부
slow_query_log_file = /logs001/mysvc01/MARIASVC/slow/mysvc01-slow.log # 느린 쿼리 로그파일 경로


##---------------------------------------------------------------------------
## Author: YJ
## DB 기본 설정
##---------------------------------------------------------------------------

skip-name-resolve                           # 역DNS 검색 비활성화 (IP 기반으로 접속을 하게 되면 hostname lookup 과정 생략)

default_storage_engine='InnoDB'             # 기본 스토리지 엔진 설정
lower_case_table_names = 1                  # 테이블명을 소문자로 처리
sysdate-is-now                              # SYSDATE 구문을 NOW와 동일하게 처리

sql_mode="TRADITIONAL,IGNORE_SPACE,ONLY_FULL_GROUP_BY,ANSI_QUOTES"
# sql_mode 설명 : SQL문 사용 제한 = 쿼리 점검 수준
# TRADITIONAL = STRICT_TRANS_TABLES,STRICT_ALL_TABLES = 잘못된 값이 컬럼에 입력되거나 업데이트될 때 에러를 반환함
#              ,NO_ZERO_IN_DATE,NO_ZERO_DATE = 날짜타입에 0000-00-00 입력 못 하게 함
#              ,ERROR_FOR_DIVISION_BY_ZERO = 0으로 나눌 때는 오류 발생시킴
#              ,NO_AUTO_CREATE_USER = 권한 부여 문장이 실행된다고 해서 자동으로 유저를 생성하지 않게 함
#              ,NO_ENGINE_SUBSTITUTION = 기본 스토리지 엔진의 자동 대체를 방지
# IGNORE_SPACE : 프로시저나 함수명과 괄호 사이의 공백 무시
# ONLY_FULL_GROUP_BY : 그룹핑 작업을 할 때 GROUP BY 절에 그룹핑 키 컬럼들이 다 있어야만 함
# ANSI_QUOTES : 홑따옴표만 문자열 값 표시로 사용, 쌍따옴표는 문자열 리터를 표기에 사용할 수 없음
# PAD_CHAR_TO_FULL_LENGTH : MariaDB/MySQL은 기본적으로 CHAR 타입도 VARCHAR 처럼 문자열 뒤 공백 문자를 제거하는데, 공백을 제거하지 않고 채우게 하려면 설정함

#feedback = ON                              # MariaDB로 에러 내용 보내기
event_scheduler = ON                        # 이벤트스케줄러(cron, Oracle의 Job과 같은 역할) 활성화
performance_schema = ON                     # performance_schema 활성화
#performance_schema_max_digest_length=10240 # digest의 최대 길이 (digest:정형화시킨 쿼리문, 상수부분 등을 패턴화시킨다.)
plugin-load = server_audit


##---------------------------------------------------------------------------
## Author: YJ
## Character Set
##---------------------------------------------------------------------------
skip-character-set-client-handshake         # 클라이언트에서 보내지는 문자셋 정보를 무시하고 서버의 문자셋 사용
character_set_server = utf8mb4
collation_server = utf8mb4_bin
init_connect='SET collation_connection = utf8mb4_bin'
init_connect='SET NAMES utf8mb4'


##---------------------------------------------------------------------------
## Author: YJ
## Transaction 설정
##---------------------------------------------------------------------------
autocommit = ON                             # autocommit 활성화 여부
transaction_isolation = "READ-COMMITTED"    # replication을 할 때는 "레코드 기반 복제"를 사용하도록 함
# transaction_isolation 설명
# . READ UNCOMMITTED
# 다른 트랜잭션이 Commit 전 상태를 볼 수 있음
# Binary Log가 자동으로 Row Based로 기록됨 (Statement설정 불가, Mixed 설정 시 자동 변환)
# . READ-COMMITTED
# Commit된 내역을 읽을 수 있는 상태로, 트랜잭션이 다르더라도 특정 타 트랜잭션이 Commit을 수행하면 해당 데이터를 Read할 수 있음
# Binary Log가 자동으로 Row Based로 기록됨 (Statement설정 불가, Mixed 설정 시 자동 변환)
# . REPEATABLE READ (기본)
# MySQL InnoDB 스토리지 엔진의 Default Isolation Level
# Select 시 현재 데이터 버전의 Snapshot을 만들고, 그 Snapshot으로부터 데이터를 조회
# 데이터에 관해서 암묵적으로 Lock과 비슷한 효과가 나타남. 즉, Select 작업이 종료될 때까지 해당 데이터 변경 작업 불가
# 동일 트랜잭션 내에서 데이터 일관성을 보장하고 데이터를 다시 읽기 위해서는 트랜잭션을 다시 시작해야 함
# . SERIALIZABLE
# 가장 높은 Isolation Level로 트랜잭션이 완료될 때까지 SELECT 문장이 사용하는 모든 데이터에 Shared Lock이 걸림
# 다른 트랜잭션에서는 해당 영역에 관한 데이터 변경 뿐만 아니라 입력도 불가

##---------------------------------------------------------------------------
## Author: YJ
## 보안 설정
##---------------------------------------------------------------------------
#skip-external-locking                      # 외부(TCP/IP) 잠금 비활성화
enable-secure-auth                          # 서버로 구버전(4.1버전 이하) 포멧으로 된 패스워드 전달 비활성화
symbolic-links = OFF                        # 심볼릭 링크 비활성화


##---------------------------------------------------------------------------
## Author: YJ
## Connection 설정
##---------------------------------------------------------------------------
thread_handling = one-thread-per-connection # 쓰레드풀(Thread Pool) 사용 여부
                                            # 쓰레드풀을 사용하려면 pool-of-threads 으로 설정

max_connections = 250                       # 허용 가능한 최대 동시 접속수, 각각의 커넥션은 최소 thread_stack의 사이즈만큼의 메모리 사용
max_connect_errors = 1000                   # 계속적으로 문제를 발생시키는 클라이언트를 몇번째 재시도후 block할지 지정
                                            # 한번 block되면, 서버를 재시작하거나 flush host명령을 실행하기 전까지 접속 불가
back_log = 100                              # max_connections 이상의 connection이 대량으로 몰릴 때 큐에 대기가능한 커넥션의 갯수
thread_cache_size = 100                     # 재 사용을 위해 보관할 쓰래드 수, thread_created가 높을 경우 증가됨
                                            # THREADS_CONNECTED 상태값의 피크보다 약간 낮게 설정하는 것을 권장함
wait_timeout = 28800                        # 접속한 후 쿼리가 들어올 떄까지 대기하는 시간(초) = noninteractive 커넥션 닫기까지의 시간
lock_wait_timeout = 28800                   # metadata lock을 획득하기 위해 대기하는 시간(초), 기본은 1년임
interactive_timeout = 3600                  # "mysql>"과 같은 콘솔이나 터미널 상에서 클라이언트의 접속을 시간(초), 기본 8시간이지만 1시간 설정 권장
connect_timeout = 10                        # mysqld 데몬이 클라이언트로 부터 접속요청을 받는 경우 기다리는 시간(초)

#net_retry_count = 10                       # 통신이 잘못되어 실패할 때, 몇 번까지 재시도할지
net_read_timeout = 60                       # 커넥션으로부터 읽기가 안 된다고 판단하기 전에 데이터를 기다리는 시간(초)
net_write_timeout = 60                      # 커넥션으로 쓰기가 안 된다고 판단하기 전에 기다리는 시간(초)

open_files_limit = 3000                     # mysql이 오픈할수 있는 file(정확히는 file descripter)개수
                                            # 가능하면 5000으로 설정하는데 OS limit에 따라 재조정 될수 있다
                                            # 실제로는 이 값에 영향을 받지 않고, OS의 nofile(open files) 제한이 적용됨
table_open_cache = 4000                     # DB전체에서 오픈할 수 있는 테이블 갯수
table-definition-cache = 4000               # 캐싱해 놓을 (.frm 파일에서 추출한)테이블 정의 갯수, 테이블이 많으면 크게 설정

##---------------------------------------------------------------------------
## Author: YJ
## Thread Pool 설정 - thread_handling = pool-of-threads 일 때만 의미 있음
##---------------------------------------------------------------------------
# thread_pool_size = 4                      # 쓰레드 그룹 갯수, 기본은 CPU 갯수와 같음
# (sleep이나 wait 상태인 쓰레드 제외하고) CPU를 동시에 사용할 수 있는 쓰레드 갯수
# 리눅스나 유닉스 계열일 때만 사용되는 설정
# thread_pool_max_threads = 500             # 쓰레드풀에 들어갈 수 있는 최대 쓰레드 갯수
# thread_pool_idle_timeout = 60             # idle 상태인 쓰레드를 정리하기 전에 대기하는 시간(초)
# thread_pool_stall_limit = 500             # 쓰레드 교착 상태 검사 간격(밀리초)
# 쓰레드 갯수가 thread_pool_max_threads에 도달하면 쓰레드는 더 이상 생성되지 않는다.

# thread_pool_oversubscribe = 3             # internal 파라미터로 임의로 수정하지 않는 것이 좋음
# thread_pool_size * thread_pool_oversubscribe = DB에서 동시에 active되어 CPU를 사용할 수 있는 쓰레드 갯수

##---------------------------------------------------------------------------
## Author: YJ
## Connection 메모리 설정
##---------------------------------------------------------------------------
sort_buffer_size = 256K         # (인덱스를 사용할 수 없는) 정렬에 필요한 버퍼의 크기, ORDER BY 또는 GROUP BY 연산 속도와 관련
join_buffer_size = 256K         # 조인이 테이블을 풀스캔 하기 위해 사용하는 버퍼크기, 드리븐 테이블이 FULL SCAN할 때 사용됨
read_buffer_size = 256K         # 테이블 스캔에 필요한 버퍼크기
read_rnd_buffer_size = 256K     # 디스크 검색을 피하기위한 랜덤 읽기 버퍼크기, 정렬 대상이 커서 two pass 알고리즘을 쓸 때만 사용

#thread_stack = 256K            # 쓰레드 하나의 스택 사이즈 (기본 64bit 시스템의 기본 256KB)

net_buffer_length = 16K         # 클라이언트에 보내는 초기 메시지의 바이트 수
max_allowed_packet = 16M        # 한 패킷의 최대 크기
group_concat_max_len = 32M      # GROUP_CONCAT() 함수를 사용할 때 이용할 수 있는 최대 크기

max_heap_table_size = 32M       # MEMORY 테이블의 최대 크기
tmp_table_size = 1M             # 메모리에 생성될 임시 테이블의 최대 크기, 이 값을 초과하면 디스크에 임시 테이블을 씀

##---------------------------------------------------------------------------
## Author: YJ
## 쿼리 캐시 설정
##---------------------------------------------------------------------------
query_cache_size = 32M          # 쿼리 결과를 캐싱하기 위해 할당하는 메모리 크기 (DB전체)
query_cache_limit = 2M          # 쿼리 결과가 이 값보다 크면 캐싱 안 함 (기본은 1M)
query_cache_type = DEMAND       # 쿼리에서 힌트로 쿼리 캐시를 사용하겠다고 설정한 경우에만 쿼리 캐시 사용
                                # 0 or OFF : 쿼리 캐시 사용 안 함, 쿼리 캐시를 안 쓰려면 query_cache_size도 0으로 설정해야 함
                                # 1 or ON : SQL_NO_CACHE를 설정하지 않은 모든 쿼리의 결과를 캐싱함
                                # 2 or DEMAND : SQL_CACHE로 설정한 쿼리의 결과만 캐싱함

##---------------------------------------------------------------------------
# Author: YJ
# MariaDB 에서 사용할 수 있는 최대 메모리 사이즈
# innodb_buffer_pool_size + innodb_additional_mem_pool_size + innodb_log_buffer_size + key_buffer_size + query_cache_size
# + max_connections * ( read_buffer_size + read_rnd_buffer_size + sort_buffer_size + join_buffer_size + thread_stack + binlog_cache_size)
##---------------------------------------------------------------------------

##---------------------------------------------------------------------------
## Author: YJ
## InnoDB 설정
##---------------------------------------------------------------------------
#innodb_page_size = 16K
#innodb_use_sys_malloc = ON                            # OS에서 제공되는 메모리 할당기능 사용 여부, ON: InnoDB에서 OS 자원을 사용
                                                       # InnoDB의 메모리 할당기능과 OS에서 제공되는 메모리 할당 기능 중 더 효율이 높은 쪽을 선택할 수 있음
innodb_buffer_pool_size = 512M                         # InnoDB 엔진으로 된 테이블과 인덱스를 캐시하기 위한 메모리 버퍼 크기
                                                       # 초기 시스템 전체 물리 메모리의 40% 수준으로 설정하고 사용량에 따라 증감
innodb_buffer_pool_instances = 2                       # 버퍼풀의 갯수, 적절한 갯수로 나누면 뮤텍스(mutex) 경합이 줄어들어 DB 동시 처리 성능을 높여줌
                                                       # 각각의 버퍼풀은 각각의 플러쉬 리스트 뮤텍스(mutex)를 가짐 (아마 LRU리스트도 가질 듯)
                                                       # 각 버퍼풀은 InnoDB 엔진이 자동으로 적절히 배분해서 사용함
#innodb_additional_mem_pool_size = 16M                 # DEPRECATED됨, 데이터 디렉토리 정보와 내부 데이타 구조를 저장하는 메모리 풀의 크기

innodb_data_file_path=ibdata1:32M;ibdata2:32M:autoextend # 시스템테이블스페이스 - 파일명:초기크기:자동증가:최대크기
innodb_file_per_table = 1                              # 테이블 단위로 테이블스페이스 할당, 활성시 테이블별로 .frm, .ibd 각각 생성
innodb_data_home_dir = /data001/mysvc01/MARIASVC       # 테이블 생성 기본 경로
#innodb_autoextend_increment = 100                     # 테이블스페이스 자동 확정시 크기

innodb_log_buffer_size = 4M                            # 로그(redo) 버퍼 크기
                                                       # 클수록 디스크 사용량이 줄어서 성능이 향상되지만 시스템 다운시 손실되는 트랜잭션 양도 증가됨
                                                       # 크기가 작으면 로그버퍼를 로그파일로 쓰기 위한 부하가 많이 발생할 수도 있음
innodb_log_group_home_dir = /data001/mysvc01/MARIASVC  # 로그(redo) 경로
innodb_log_files_in_group = 3                          # 로그(redo) 파일 갯수
innodb_log_file_size = 64M                             # 로그(redo) 파일 크기
                                                       # 일반적으로 (innodb_buffer_pool_size/innodb_log_files_in_group)를 적정 값으로 본다.

innodb-support-xa = OFF                                # 트렌젝션 two-phase commit 지원, 디스크 플러시 횟수를 줄여 성능항상
                                                       # 분산데이터 기능 (2-PhaseCommit)

innodb_buffer_pool_dump_at_shutdown = 1                # DB shutdown할 때 innodb_log_buffer에 있던 내용을 dump 파일로 내림
innodb_buffer_pool_filename = innodb_buffer_pool_dump  # DB shutdown할 때 innodb_log_buffer에 있던 내용을 담을 dump 파일명
innodb_buffer_pool_load_at_startup = 1                 # DB startup할 때 dump파일로 받아 놨던 내용을 innodb_log_buffer에 올림

innodb_thread_concurrency = 4             # InnoDB가 동시 사용가능한 최대 시스템 쓰래드 수
                                          # CPU의 2~4배 권장, 0으로 설정하면 동시성이 비활성화 됨
#innodb_thread_sleep_delay=0              # InnoDB queue에 들어가기전에 얼마나 sleep할것인가
                                          # innodb_thread_concurency에 도달하면 새로운 쓰레드는 innodb_thread_sleep_delay 동안 Sleep 함
                                          # innodb_thread_concurency = 0 이면 이 값음 무시됨
#innodb_adaptive_max_sleep_delay = 150000 # 0 이상의 값으로 지정하면, InnoDB가 innodb_thread_sleep_delay를 자동으로 조정
#innodb_concurrency_tickets = 500         # 한번 스케줄링된 쓰레드는 설정된 티켓개수만큼 자유롭게 InnoDB를 사용할수 있다
                                          # 여러 쓰레드가 innodb_thread_concurrency에 도달하면 하나의 쓰레드만 큐에 들어갈 수 있음
                                          # 하나의 쓰레드가 InnoDB에 들어가게 되면, innodb_concurrency_tickets의 값과 일치하는 “자유 티켓”의 숫자가 주어지고,
                                          # 쓰레드가 자신의 티켓을 사용하기 전 까지는 자유롭게 InnoDB에 들어가고 나올 수가 있다.
                                          # 이런 후에는, 쓰레드는 다시금 일관성 검사를 하고 InnoDB에 다시 들어가려고 시도하게 된다

# InnoDB는 IO request를 background threads에 가능한한 동등하게 분배하고, 동일한 extent에 대한 read requests는 동일한 thread에게 할당함
innodb_read_io_threads = 4           # InnoDB 읽기 작업을 위한 I/O 쓰레드의 수, 주목적: read-ahead requests
                                     # SHOW ENGINE INNODB STATUS 에서 pending read requests가 64 x innodb_read_io_threads이상이라면, 
                                     # innodb_read_io_threads를 더 할당하는 것을 고려
innodb_write_io_threads = 4          # InnoDB 쓰기 작업을 위한 I/O 쓰레드의 수
# read-ahead 란?
# 하나의 extent(64개 pages group)을 모두 buffer pool에 prefetch하는 작업. (asynchronous request임)
# 이들 페이지도 곧 읽혀질거라는 가정하에 모두 버퍼에 올리는 것
# 알고리즘)
# linear read-ahead technique: 버퍼풀 안에 순차적으로 읽혀진 페이지 개수로 판단
#                              만약 하나의 extent내에서 순차적으로 읽혀진 페이지 개수가 innodb_read_ahead_threshold 이상이면 다음 extent전체 페이지를 read-ahead
# random read-ahead technique: 버퍼풀 안에 존재하는 페이지 개수로 판단(순차적인지 여부와 무관함)
#                              만약 한 extent내의 13개의 연속된 페이지가 버퍼풀에 존재한다면, 해당 extent의 나머지 pages들을 read-ahead한다

innodb_lock_wait_timeout = 1200      # 트랜잭션 락(record lock)을 대기하는 시간(초)

#innodb_flush_neighbors = 1          # InnoDB 버퍼풀에서 페이지 플러시를 할 때(=디스크로 기록할 때), 인접한 더티 페이지도 (단일 I/O로) 플러시할 지 결정하는 변수
                                     # 랜덤액세스 쓰기 성능이 떨어지는 HDD에서는 좋으나, SSD에서는 비활성화하는 것이 성능에 유리함
                                     # 0: 해제, 1: 같은 extent안에 연속된 더티 페이지를 같이 플러시함, 2: 같은 extent안에 모든 더티 페이지를 플러시함

#innodb_io_capacity = 100            # 백그라운드 플러싱 속도 제어를 위한 변수, 큰 값을 지정하면 I/O 대역폭을 점유하므로 환경에 맞춰서 설정할 것
                                     # InnoDB 메인 쓰레드가 I/O 작업을 할 수 있는 capa, 시스템의 I/O 수준에 의존적임
                                     # 일반적으로 7200 RPMs 하드 드라이브인 경우 100으로 설정
                                     # RAID 구성이나 SSD 사용 등에 따라서 더 높은 값으로 설정
                                     # Raid1: 200. Raid10: 200 x write arrays. SSD: 5000. FusionIO: 20000

innodb_flush_log_at_trx_commit = 0   # InnoDB에서 커밋될 때마다 로그(redo)를 디스크에 플러시할지를 결정하는 옵션
# fsync() 함수를 호출하는 빈도에 관한 옵션
# 0 : 커밋될 때마다 디스크 플러시를 하지는 않음, OS에서 적절한 시점(일반적으로 4~5초 간격)마다 데이터 동기화를 처리하게 됨
#     잘 못 되면 4~5초간의 데이터는 유실될 수도 있음
# 1 : 트랜잭션이 커밋될 때마다 로그 파일에 기록되고 디스크 플러시가 실행 (가장 안전, 가장 느림)
# 2 : 커밋되면 강제로 로그 버퍼를 로그 파일에 쓰지만, 1초가 지나기 전에는 디스크에 저장되지 않음

innodb_flush_method = O_DIRECT
# InnoDB가 dafa files, log files로 data를 flush(디스크에 기록하고 동기화하는 작업)하는 방법
# ------------------+----------+----------+-----------+-----------------+-----
# Method            | log file | log file | data file | data file flush | 설명
# Method            | open     | fulsh    | open      | data file flush | 설명
# ------------------+----------+----------+-----------+-----------------+-----
# fsync             | normal   | fsync()  | normal    | fsync()         | 기본
# O_DSYNC           | O_SYNC   | O_SYNC   | normal    | fsync()         | synchronized(동기) I/O로서, write작업시 hardware단까지 fsync함
# O_DIRECT          | normal   | fsync()  | O_DIRECT  | fsync()         | OS caching을 하지 않고 direct I/O로 innodb_buffer_pool에서 file로 I/O함
# O_DIRECT_NO_FSYNC | normal   | fsync()  | O_DIRECT  | skip fsync()    | O_DIRECT와 동일한데 data file 동기화를 위한 fsync 호출을 생략함
# ------------------+----------+----------+-----------+-----------------+-----
# fsync = 데이터와 메타정보를 함께 변경하는 방식 (파일메타정보는 파일변경일시,수정자 등을 의미함, fdatasync "데이터만 변경, 메타데이터는 무시")
# O_DIRECT = pache cache, buffer cache는 directly하게 write bypass하지만, inode cache, directory cache, metadata는 따로 fsync()를 호출해서 flush 해줘야 함
#            (캐시메모리 장착된)RAID 컨트롤러가 없거나 SAN을 사용할 때는 O_DIRECT를 사용 하지 않는 것이 좋음
#            double buffering(InnoDB buffer pool과 OS file system cache에 두번 캐쉬)을 하지 않기 떄문에 성능향상을 기대할 수 있다.
# O_DIRECT_NO_FSYNC = 몇몇 file system에서는 O_DIRECT가 fsync()없이도 metadata까지 synchronize되는 걸 보장함. 그래서 InnoDB가 O_DIRECT_NO_FSYNC를 추가함

# 디스크에 데이터를 쓰는 방법 = 1단계 "운영체로의 버퍼로 기록" + 2단계 "버퍼의 내용을 디스크로 복사"
#   - 동기(Sync) I/O = 1단계와 2단계를 함께 실행
#   - 비동기(Async) I/O = 1단계와 2단계를 다른 시점에 실행
#   - direct I/O = 1단계 무시, 2단계 "버퍼의 내용을 디스크로 복사"만 실행

innodb_adaptive_hash_index = ON
# Adaptive Hase Index
# 1. workload와 충분한 buffer pool memory의 적절한 조합하에서, 트랜잭션 특성이나 신뢰성에 위배되지 않는 선에서, InnoDB를 in-memory DB처럼 동작하게 함
# 2. 동작
# 1) MySQL은 search 패턴을 고려하여 index prefix(인덱스 키의 값 앞부분)로 hash index를 만든다
# 2) 자주 access되는 인덱스 페이지에 대해서만 부분적으로 생성될 수도 있다.
# 3) InnoDB는 index search 패턴을 모니터링하는 메커니즘을 가지고 있어서 해당 쿼리가 hash index를 사용하면 이익이라고 판단되면, 자동으로 hash index를 생성한다
# 4) 만약 테이블 전체가 메모리에 들어갈수 있는 사이즈인 경우, hash index는 쿼리 속도를 향상시킨다.
#    인덱스를 pointer와 같이 동작하게 해서 원하는 로우를 바로 다이렉트하게 찾을수 있다.
# 5) 자주 사용되는 데이터는 해시를 통해서 직접 접근할 수 있기에, Mutex Lock으로 인한 지연은 확연하게 줄어듦
# 6) heavy workload하에서는(동시 대량 배치 작업 등), adaptive has index를 접근할때 획득하는 read/write lock이 contention의 원인이 되기도 한다
# 7) LIKE % 쿼리의 경우에는 Adaptive Hase Index가 별 이득이 안 된다
# 3. 모니터링
# 1) 할당되는 메모리는 Innodb_Buffer_Pool_Size의 1/64만큼으로 초기화(최소가 그렇고 최대는 알 수 없음)
#    지나치게 커지지 않도록 상태의 주기적 확인 필요 (SHOW GLOBAL STATUS LIKE 'Innodb%adaptive%';)
# 2) SHOW ENGINE INNODB STATUS 에서 SEMAPHORE 섹션에 RW-latch를 대기하는 thread가 여러개 있다면, disable하는 것이 더 좋을 수도 있다.
# 3) 테이블 DROP은 최대한 트래픽이 없는 새벽에, Adaptive Hash Index를 순간 OFF/ON을 하여 메모리를 해제하고, 테이블을 DROP하는 것이 좋다.

innodb_adaptive_hash_index_partitions = 2
# adaptive_hash_index를 몇 개로 나눠쓸지 결정하는 변수
# 기본은 1 이며, 1일 때는 단일 Mutex로 관리되기 때문에 테이블을 DROP하게 되면 adaptive_hash_index에서 관련 정보를 정리하려고 하면서
# adaptive_hash_index 덕을 보던 쿼리들까지 영향을 받을 수 있음
# 변수값을 크게 설정하면 Mutex가 여러 개가 되면서 테이블을 DROP할 때 adaptive_hash_index에서 Mutex 경합으로 인해 발생할 수 있는 문제를 줄일 수 있음
# InnoDB 내부적으로는 테이블 DROP시 Sleep없이 죽으라고 Hash Index에서 관련 노드를 모두 삭제한 후 테이블이 제거
# 개인적인 생각으로는 CPU 개수 정도면 적당할 듯 함

#innodb_change_buffering = all       # change buffering 설정
# change buffering = insert buffering + delete buffering + purge buffering
# all : 기본: buffer inserts, delete-marking operations, and purges.
# none : Do not buffer any operations.
# inserts : Buffer insert operations.
# deletes : Buffer delete-marking operations.
# changes : Buffer both inserts and delete-marking.
# purges : Buffer the physical deletion operations that happen in the background.
# Innodb는 인덱스 leaf node를 업데이트하지 않고 buffer만 해둠, 버퍼에 임시로 저장해 두고 나중에 여유가 될 때 실제 인덱스에 병합함
# secondary index의 leaf node를 update하려면, 디스크로부터 index page를 읽어서 변경해야하는데 이는 부수적으로 추가 IO가 필요한 작업이기 때문
# 저장: change buffer는 system tablespace에 위치함
# 조건: non-unique한 인덱스에 대한 변경사항 저장, 변경작업에 해당하는 page가 buffer pool에 존재하지 않을때만 change buffer에 변경을 저장
# merge 작업)
# background thread에 의한 주기적으로 병합
# 해당 page가 다른 read operation에 의해서 buffer pool로 불려읽혀졌을 때

#innodb_change_buffer_max_size=25    # 버퍼풀에서 change_buffer가 차지할 비율

#innodb_old_blocks_pct = 37          # LRU 리스트 영역의 범위(퍼센트)
#innodb_old_blocks_time = 1000       # LRU 리스트에서 MRU 리스트로 옮기기 전에 대기하는 시간(밀리초)
# MRU: Most Recently used list, LRU: Last Recently used list
# 버퍼풀의 페이지를 관리하는 리스트 = MRU 리스트 + LRU 리스트

innodb_autoinc_lock_mode = 1
# auto_increment 칼럼에 들어갈 값을 위한 lock 설정
# 0 : insert 할 때 마다 auto increment lock 사용, insert ... select ... 처럼 대량 데이터 입력할 때는 lock 대기가 길어짐
# 1 : insert ... select ... 처럼 대량 데이터 입력할 때 미리 일정량의 자동 증가값을 만들어 사용
#     미리 만든 일정량의 자동 증가값이 다 사용되지 않으면 나머지는 버림
# 2: auto increment lock을 사용하지 않고 mutex 사용, auto_increment 값이 유니크함은 보장하지만 순서는 보장하지 못 함

#innodb_max_dirty_pages_pct=75       # 버퍼풀에 남아 있을 수 있는 더티 페이지의 비율 (이 비율이 넘어가면 체크포인트가 수행됨)
                                     # 더티페이지(dirty page) = SQL 조작으로 변경됐지만 아직 디스크에 쓰여지지 않은 데이터 페이지
#innodb_adaptive_flushing=ON         # InnoDB 엔진이 리두 로그의 발생량을 모니터링 하면서 버퍼 풀의 더티페이지를 디스크로 쓰는 작업 속도를 조절하게 함
                                     # ON 이 아니면 더티페이지의 비율이 innodb_max_dirty_pages_pct를 넘어서는 순간 공격적인 디스크 쓰기 일어날 수 있음
#innodb_use_native_aio=ON            # 리눅스와 윈도우 플랫폼에 한해 네이티브 비동기 I/O 방식이 제공됨 (I/O요청 동시성 증대 효과)
                                     # libaio 라이브러리가 설치되어 있고, 이 값을 "ON"으로 설정해야 사용 가능함

innodb_doublewrite = 1               # doublewrite buffer와 data file에 이중 쓰기 활성화 (기본: 활성)
# 목적: 시스템 crash, 전원공급중단 등 장애시 보다 안전한 리커버리
#       OS의 기본IO 단위(보통 4K)와 DB의 기본IO단위(보통 16K)가 다름으로 인해 발생할 수 있는 page currupt를 방지하기 위해 사용
#       (16K가 OS를 통해 다 써지기 전에 시스템 crash가 가 되도, 안전하게 복구할 수 있도록 도와줌)
#       InnoDB는 full pages를 로깅하지는 않으므로 필요함
#       InnoDB는 log file에 page number, 변경내용, log sequence 정보를 기록함
# Doublewrite Buffer 는?
# 1. 기본적으로 system tablespace에 위치함
# 2. Flush 이벤트 발생시 Doublewrite Buffer를 먼저 쓰고, 그 다음에 대상 페이지의 내용을 변경함 
#    (대상 페이지의 변경 작업은 fsync()를 call해서 진행됨)
# 3. Doublewrite Buffer에 기록되는 내용은 해당 페이지 정보와 operation 정보임
# 4. 여러 개의 dirty page를 각각의 데이터파일에 플러쉬하려면 랜덤I/O가 발생하여 시간이 오래 걸리므로 
#     dirty page를 모아서 시스템 테이블스페이스 내 하나의 연속적인 extent에 쓰고 단일 I/O로 처리
# 5. fsync() 횟수 줄임 - 매 page마다 fsync()를 콜하는게 아니라, multiple page를 한번에 쓰고 fsync()
# 6. 일반적으로 doublewrite를 활성화에 의해서 발생하는 성능 저하는 5% 정도로 본다.

#innodb_sync_spin_loops = 30         # 쓰레드가 지연되기 전에 (suspended) 풀어 주기 위해 InnoDB 뮤텍스(mutex)를 기다리는 쓰레드의 대기 시간
                                     # spin loop: CPU를 사용하면서 락이 해제됐는지 검사하는 것
                                     # 동일한 쿼리가 동시다발적으로 유입되어 여러 스레드에서 메모리내의 같은 데이터 블록에 접근하여 뮤텍스 경합이 발생,
                                     # CPU 부하가 높아지는 경우에는 이 값을 줄여가면 부하가 줄어들 수도 있음 (10정도까지는 괞찮을 듯)

#innodb_table_locks = 1              # LOCK TABLES은 AUTOCOMMIT=0경우에, InnoDB로 하여금 내부적으로 테이블을 잠금
#innodb_max_purge_lag = 0            # 퍼지 연산 (purge operation)이 래깅(lagging)될 때 INSERT, UPDATE 및 DELETE 연산을 지연 시키는 방법을 제어
                                     # 디폴트값 0일시 지연 없음

#innodb_commit_concurrency = 0       # 동시에 commit 처리를 할 수 있는 쓰레드의 숫자. 값이 0이 되면 동시성 제어(concurrency control)가 비활성화

#innodb_purge_threads = 1            # purge 작업을 실행할 쓰레드의 수 (기본1~최대32)
# InnoDB의 purge 작업
# 예전) 주기적으로 수행되는 가비지 컬렉션 작업의 한 종류, 마스터 쓰레드에 의해 동작됨, purge하는 동안 다른 데이터베이스 작업들은 대기해야 함
# MySQL 5.5이후) 개별의 쓰레드에서 수행되면서 더 높은 동시성 보장

innodb_file_format = barracuda       # InnoDB 파일 포멧: 테이블압축 등의 기능을 사용하려면 barracuda 사용
innodb_file_format_max = barracuda
innodb_large_prefix = ON             # 인덱스 키 칼럼의 prefix를 767 bytes 이상으로 설정 (최대 3072 bytes까지 설정 가능)
innodb_open_files = 4000             # DB전체에서 동시에 열어 놓을 수 있는 InnoDB 테이블의 .ibd 파일의 수

#innodb_stats_persistent = 1 (ON)    # 통계정보를 주기적으로  mysql.innodb_table_stats, mysql.innodb_index_stats 테이블에 영구히 저장
#innodb_stats_auto_recalc = 1 (ON)   # 주기적으로 통계 정보를 갱신
#innodb_stats_persistent_sample_pages = 20 # mysql.innodb_table_stats, mysql.innodb_index_stats 테이블에 영구히 저장할 통계정보 수집에 사용할 샘플 페이지 수
#innodb_stats_sample_pages = 8       # 통계정보 수집에 사용할 샘플 페이지 수
#innodb_stats_on_metadata = OFF      # 다음 명령들이 실행될 때 통계 정보 갱신 활성화
                                     # SHOW TABLE STATUS, SHOW INDEX, INFORMATION_SCHEMA.TABLES 조회, INFORMATION_SCHEMA.STATISTICS 조회

innodb_show_verbose_locks = 1        # "SHOW ENGINE INNODB STATUS"에 락이 잡힌 레코드 표시
innodb_print_all_deadlocks = ON      # 에러 로그에 InnoDB 데드락 정보 기록 활성화

#innodb_status_output = ON;          # 에러 로그에 "SHOW ENGINE INNODB STATUS" 결과 포함 설정
innodb_status_output_locks = ON      # InnoDB Status를 보는 부분("SHOW ENGINE INNODB STATUS" 혹은 에러로그)에 lock 정보도 함께 표시되도록 함

#innodb_force_recovery = 0
# 크래시 복구 모드 설명 : 큰 값은 작은 값의 내용을 포함함
# 1 (SRV_FORCE_IGNORE_CORRUPT) 서버가 깨진 페이지를 발견한다고 하더라도 계속 구동하도록 만듦
# 2 (SRV_FORCE_NO_BACKGROUND) 메인 쓰레드가 구동되지 못 하도록 함
# 3 (SRV_FORCE_NO_TRX_UNDO) 복구 다음에 트랜젝션 롤백을 실행하지 않음
# 4 (SRV_FORCE_NO_IBUF_MERGE) 삽입 버퍼 병합 연산 (insert buffer merge operations)까지 금지
# 5 (SRV_FORCE_NO_UNDO_LOG_SCAN) 데이터베이스를 시작할 때 UNDO log를 검사하지 않음
# 6 (SRV_FORCE_NO_LOG_REDO) 복구 연결에서 로그 롤-포워드 (roll-forward)를 실행하지 않음

##---------------------------------------------------------------------------
## Author: YJ
## MyISAM 스토리지 엔진 관련 설정
## InnoDB를 사용하지 않고 MyISAM만 사용한다면 key_buffer_size를 크게 설정
##---------------------------------------------------------------------------
key_buffer_size = 16M                  # MyISAM 테이블이 거의 없고, 데이터도 매우 적으므로 아주 작게 설정
bulk_insert_buffer_size = 1M
myisam-recover-options = BACKUP,FORCE  # MyISAM 테이블을 열 때 자동 복구 옵션
myisam_sort_buffer_size = 1M           # 인덱스 정렬시 할당되는 버퍼의 크기
myisam_max_sort_file_size = 64M        # 인덱스 재 생성시 사용할 임시 파일의 최대 크기
#myisam_repair_threads = 1             # 정렬 복구시 사용될 쓰레드 갯수
#ft_min_word_len                       # MyISAM 혹은 InnoDB 테이블 FULLTEXT 인덱스를 만들 때 포함될 단어의 최소 길이 (mgroonga와는 관련 없는 설정)
                                       # 이 값을 변경하면 "REPAIR TABLE 테이블이름 QUICK" 으로 재 구축해야함

##---------------------------------------------------------------------------
## Author: YJ
## Aria 스토리지 엔진 관련 설정
## internal temporary table이 생성될 때는 기본적으로 Aria 스토리지 엔진을 사용하므로 지나치게 작게 설정하지 말 것
## 예: aria_pagecache_buffer_size = 1M
##---------------------------------------------------------------------------
aria_pagecache_buffer_size = 32M
aria_sort_buffer_size = 32K
aria_log_file_size = 64M


##---------------------------------------------------------------------------
## Author: YJ
## 통계 및 Optimizing 관련 설정
##---------------------------------------------------------------------------
use_stat_tables = NEVER                 # 스토리지 엔진 통계 정보와 통합 통계 정보를 이용하는 우선순위를 결정
# NEVER: 스토리지 엔진 통계정보만 수집
# COMPLEMENTARY : 스토리지 엔진 통계정보를 우선 사용하고 정보가 부족하면 통합 통계 정보 사용
# PREFERABLY: 통합 통계정보를 우선 사용 사용하고 정보가 없으면 스토리지 엔진 통계 정보 사용
# 통합 통계정보란? mysql.table_stat, mysql.column_stat, mysql.index_stat

histogram_size = 20                    # 히스토그램을 저장할 공간 크기(bytes단위), 히스토그램 정보는 mysql.column_stat 저장
# 0 ~ 255 까지 설정 가능, 0이면 히스토그램 수집 안 함
# MariaDB는 Height-Balanced Histogram 알고리즘 사용, 버킷에 저장된 최대값을 1byte 할당해서 저장
histogram_type = SINGLE_PREC_HB         # 
# SINGLE_PREC_HB : histogram_size   만큼 버킷 생성
# DOUBLE_PREC_HB : histogram_size/2 만큼 버킷 생성 (버킷당 2byte를 사용하는 대신 정확성을 확대했기 때문)

#optimizer_prune_level = 1               # 조인 순서 결정 알고리즘 선택 (1: Greedy 방식, 2: Exhaustive 방식)
optimizer_search_depth = 20             # Greedy 방식에서 쿼리에 있는 테이블 중 몇개 테이블의 조인 순서 최적화를 찾을 지 결정 (기본 62)
optimizer_use_condition_selectivity = 4 # 옵티마이저 선택도(1~5)
# 1: MariaDB 5.5 버전에서 사용하던 선택도 예측 방식을 유지(디폴트 값)
# 2: 인덱스가 생성된 칼럼의 조건에 대해서만 선택도 판단
# 3: 모든 칼럼의 조건에 대해서 선택도 판단(히스토그램 사용 안함)
# 4: 모든 칼럼의 조건에 대해서 선택도 판단(히스토그램 사용)
# 5: 4에 추가적으로 범위 검색이 아닌 조건에 대해서는 샘플링 정보를 이용해 선택도를 판단

userstat = ON                           # Enable INFORMATION_SCHEMA.%_STATISTICS tables




##---------------------------------------------------------------------------
## Author: YJ
## Binary Logs
##---------------------------------------------------------------------------
server_id = 1

# Binary Log 설명
# 1. 써지는 시점
# 1) 트랜잭션을 지원하는 스토리지 엔진(예: InnoDB)
#    commit 된 후 lock이 해지 되지 않은 상태에서 쿼리를 로깅
#    commit 전에는 쿼리 정보가 cache되고 commit 될 때 모든 쿼리 정보가 로깅됨
# 2) 트랜잭션을 지원하는 않는 스토리지 엔진(예: MyISAM)
#    쿼리 실행 직후 바로 로깅됨
#    트랜잭션 안에 트랜잭션을 지원하지 않는 테이블이 섞이면, 트랜잭션이 롤백되도 그 테이블의 데이터는 롤백 안 됨
# 2. 활성화 방법
# log_bin 설정

log_bin = /data001/mysvc01/binary_MARIASVC/mysvc01-bin  # binary log 경로

#binlog_cache_size = 256K                            # 쓰레드 별로 binary logging과 관련된 내용을 저장하기 위한 캐시 사이즈로 트랜잭션 지원 구문만을 위해 사용됨
                                                     # 큰 다중문 트랜잭션을 번번히 사용한다면 이 사이즈를 크게 잡아서 퍼포먼스를 개선할 수 있음
                                                     # 최대 사이즈: max_binlog_cache_size로 설정가능
#binlog_stmt_cache_size = 32K                        # 쓰레드 별로 binary logging과 관련된 내용을 저장하기 위한 캐시 사이즈로 트랜잭션 지원하지 않는 구문만을 위해 사용됨
                                                     # 최대 사이즈: max_binlog_stmt_cache_size로 설정가능

#binlog_checksum = NONE                              # NONE: binary log의 이벤트가 제대로 작성됐는지 각각의 이벤트 길이를 체크해서 확인

max_binlog_size = 256M                               # binary log file 최대 크기

binlog_format = ROW                                  # binary log에 기록할 데이터 유형
# transaction_isolation이 "READ-COMMITTED" 이상이면 "MIXED" 이상으로 설정해야 함
# STATEMENT: 명령문 기록
# MIXED : 몇몇 일관성을 보장하지 못 하는 경우에는 ROW 포멧으로, 그 외에는 STATEMENT 포멧으로 기록
# ROW: 실제 레코드 기록

sync_binlog = 0                                      # DB의 binary log 동기화 빈도 설정
# 0: binary log를 기록하지만 직접적으로 플러시(동기화)를 실행하지 않고, OS에 맡김 (리눅스 계열은 3~5초 간격으로 자동 플러시함)
# 1: binary log의 쓰기가 발생할 때마다 디스크 동기화 수행
#    binary log 손실은 없지만 잦은 디스크 I/O로 느려질 수 있음
# 1 이상의 값: 설정된 횟수만큼 binary log 쓰기가 발생할 때마다 DB가 binary log 파일의 동기화를 실행
#              설정된 값이 클수록 손실될 수 있는 binary log의 양이 많아지고 binary log의 쓰기 성능은 좋아짐

expire_logs_days = 1                                 # binary log 보관기간(일), 이 기간이 지나면 자동 삭제
log_bin_trust_function_creators = 1                  # Routine 생성자 신뢰, replication 환경에서는 이 설정을 해야만 Routine 생성이 가능함
#binlog-annotate-row-events = ON                     # 주석도 binary log에 남도록 처리

#sql_log_bin = 0
# mysqld에 적용되는 시스템변수는 아니고, 쓰레드레벨에서 설정할 수 있는 값임
# 해당 쓰레드에서 binary log가 안 남게 하고 싶을 때는 0으로 설정 가능, SUPER 권한 필요함

##---------------------------------------------------------------------------
## Author: YJ
## 슬레이브(Slave) 설정 - replication 환경에서 slave일 때만 의미 있음
##---------------------------------------------------------------------------
#relay_log = /logs001/mysvc01/MARIASVC/relay         # 릴레이 로그 경로
#relay_log_purge = TRUE
#read_only                                           # 일기 전용 DB로 설정


##---------------------------------------------------------------------------
## Author: YJ
## 슬레이브(Slave)이면서 마스터(Master)인 경우
##---------------------------------------------------------------------------
#log-slave-updates                                   # 현재 복제되는 쿼리를 바이너리 로그에 저장

##---------------------------------------------------------------------------
## Author: YJ
## mysqld_safe 데몬에만 적용되는 설정
##---------------------------------------------------------------------------
[mysqld_safe]
log-error=/logs001/mysvc01/MARIASVC/error/mysqld.err    # 에러로그 파일경로
pid-file = /engn001/mysvc01/MARIASVC/mysqld.pid         # 프로세스 ID 파일경로
socket = /engn001/mysvc01/MARIASVC/mysqld.sock          # 소켓파일 경로
nice           = 0


##---------------------------------------------------------------------------
## Author: YJ
## mysqldump 툴을 이용한 DB 접속시에만 적용되는 설정
##---------------------------------------------------------------------------
[mysqldump]
max-allowed-packet    = 1G
default-character-set = 'utf8mb4'
quick                             # 버퍼를 사용하지 말고, direct로 덤프받기


##---------------------------------------------------------------------------
## Author: YJ
## myisamchk 툴을 이용한 DB 접속시에만 적용되는 설정
##---------------------------------------------------------------------------
[myisamchk]
key-buffer-size   = 10M
sort-buffer-size  = 10M
read-buffer-size  = 8M
write-buffer-size = 8M


##---------------------------------------------------------------------------
## Author: YJ
## mysql 클라이언트 툴을 이용한 DB 접속시에만 적용되는 설정
##---------------------------------------------------------------------------
[mysql]
default-character-set = 'utf8mb4'
no-auto-rehash                     # 자동 완성 기능 비활성화
local-infile = ON                  # local file을 이용한 LOAD DATA 작업이 가능하게 함
enable-secure-auth                 # 서버로 구버전(4.1버전 이하) 포멧으로 된 패스워드 전달 비활성화
prompt=(\U){\h}[\d]\_\R:\m:\\s>\_  # SQL 프롬프트 설정
pager=less -n -i -F -X -E          # 데이터 출력시 페이징처리
show-warnings                      # 경고 발생시 메세지 자동 출력
#safe-updates                      # 데이터 변경 또는 삭제시 where절을 필수로 갖도록 처리
#i-am-a-dummy


##---------------------------------------------------------------------------
## xtrabackup (innobackupex) 툴을 이용한 DB 접속시에만 적용되는 설정
##---------------------------------------------------------------------------
[xtrabackup]
default-character-set = 'utf8'
# clientlib 5.1로 xtrabackup binary가 build된 경우, 해당 lib에는 utf8mb4가 없어서 아래와 같은 오류가 발생할 수 있음
# 오류내용: "Can't initialize character set utf8mb4"
# lib 5.5로 xtrabackup을 다시 컴파일하면 문제가 없지만 workaround로 위와 같은 옵션을 설정해도 됨
# 위 설정은 특별한 의미는 없으며 lib 5.1에는 utf8이 있기 때문에 오류가 발생하진 않음


##---------------------------------------------------------------------------
## Author: YJ
## 모든 클라이언트 툴을 이용한 DB 접속시에 적용되는 설정
##---------------------------------------------------------------------------
[client]
port   = 3306
socket = /engn001/mysvc01/MARIASVC/mysqld.sock
default-character-set=utf8mb4

2020/06/25 10:44 2020/06/25 10:44
사용자 삽입 이미지

BeautifulSoup, scikit-learn, TensorFlow를 사용하여 실무에 머신러닝/딥러닝을 적용해 보자!
인공지능, 머신러닝, 딥러닝은 바둑, 의료, 자동차 등 이미 다양한 분야에서 성공적인 성과를 보여주고 있습니다. 이러한 머신러닝, 딥러닝과 관련된 성공 사례를 듣고 나면 실제 업무에서도 활용해보고 싶을 것입니다. 사실 머신러닝이라고 하면 어려운 수학과 관련된 지식이 필요하다고 생각하는 경우가 많지만, 그렇게까지 어려운 수학을 사용하는 경우는 거의 없습니다. 활용할 데이터만 가지고 있다면 자신이 원하는 것을 만들어낼 수 있습니다.

[파이썬을 이용한 머신러닝, 딥러닝 실전 개발 입문]에서는 머신러닝의 바탕이 되는 데이터를 수집하고, 수집된 데이터를 기반으로 머신러닝을 수행하는 방법을 설명합니다. 인터넷에서 데이터를 어떻게 효율적으로 수집하는지 알아보고, 머신러닝을 원활하게 할 수 있게끔 데이터를 가공하는 방법을 살펴봅니다. 나아가 가공된 데이터를 이용해 챗봇 제작, 규동 메뉴 이미지 판정, 얼굴 인식 등 머신러닝에 활용하는 과정까지 실질적인 파이썬 예제 코드로 소개합니다.


00장: 머신러닝을 위한 데이터 처리
0-1. 크롤링, 스크레이핑, 머신러닝
인터넷의 빅데이터
스크레이핑, 크롤링, 데이터 가공
머신러닝에 사용할 수 있는 데이터의 구조
01장: 크롤링과 스크레이핑
1-1. 데이터 다운로드하기
웹상의 정보를 추출하는 방법
urllib.request를 이용한 다운로드
웹에서 데이터 추출하기
BeautifulSoup로 스크레이핑하기
1-2. BeautifulSoup로 스크레이핑하기
네이버 금융에서 환율 정보 추출하기
웹 브라우저로 HTML 구조 확인하기
1-3. CSS 선택자
위키 문헌에 공개돼 있는 윤동주 작가의 작품 목록 가져오기
CSS 선택자 자세히 알아보기
CSS 선택자로 추출 연습하기
정규 표현식과 함께 조합하기
1-4. 링크에 있는 것을 한꺼번에 내려받기
한꺼번에 다운받는 데 필요한 처리 내용
상대 경로를 전개하는 방법
재귀적으로 HTML 페이지를 처리하는 방법
02장: 고급 스크레이핑
2-1. 로그인이 필요한 사이트에서 다운받기
HTTP 통신
requests 사용해보기
2-2. 웹 브라우저를 이용한 스크레이핑
웹 브라우저 원격 조작에 사용하는 Selenium
웹 사이트를 이미지로 캡처해보기
네이버에 로그인해서 구매한 물건 목록 가져오기
Selenium으로 스크레이핑하는 방법
자바스크립트 실행해보기
2-3. 웹 API로 데이터 추출하기
웹 API
웹 API를 제공하는 이유
웹 API 사용해보기 - OpenWeatherMap의 날씨 정보
국내에서 사용할 수 있는 웹 API
2-4. cron을 이용한 정기적인 크롤링
정기적인 크롤링
매일 환율 정보 저장하기
cron으로 매일 한 번 실행하기
crontab 설정 방법
03장: 데이터 소스의 서식과 가공
3-1. 웹의 다양한 데이터 형식
텍스트 데이터와 바이너리 데이터
XML 분석
JSON 분석
YAML 분석
CSV/TSV 분석
엑셀 파일 분석
3-2. 데이터베이스
데이터베이스
데이터 저장에는 어떤 데이터베이스를 사용해야 할까?
SQLite - 가볍게 파일 하나로 사용할 수 있는 데이터베이스
MySQL 사용하기
TinyDB 사용하기
04장: 머신러닝
4-1. 머신러닝이란?
머신러닝 개요
머신러닝의 종류
머신러닝의 흐름
머신러닝의 응용 분야
초과 학습(초과 적합)
4-2. 머신러닝 첫걸음
머신러닝 프레임워크 scikit-learn
XOR 연산 학습해보기
붓꽃의 품종 분류하기
4-3. 이미지 내부의 문자 인식
손글씨 숫자 인식하기
이미지 데이터 학습시키기
4-4. 외국어 문장 판별하기
외국어 판정
판정 방법
샘플 데이터 수집
언어 판별 프로그램
웹 인터페이스 추가하기
4-5. 서포트 벡터 머신(SVM)
SVM이란?
SVM을 실제로 사용해보기
SVM의 종류
4-6. 랜덤 포레스트
랜덤 포레스트란?
랜덤 포레스트 사용하기
4-7. 데이터를 검증하는 방법
크로스 밸리데이션
그리드 서치
05장: 딥러닝
5-1. 딥러닝 개요
딥러닝
5-2. TensorFlow 설치하기
TensorFlow
설치 방법
설치가 제대로 됐는지 확인하기
TensorFlow로 간단한 계산해보기
5-3. Jupyter Notebook
Jupyter Notebook 설치하고 실행하기
새 노트 만들기
데이터 시각화
TensorFlow와 함께 사용하기
5-4. TensorFlow 기본
TensorFlow 기본
머신러닝 해보기
5-5. TensorBoard로 시각화하기
TensorBoard의 사용법
5-6. TensorBoard로 딥러닝하기
딥러닝의 구조
딥러닝 해보기 - MNIST 손글씨 데이터
5-7. Keras로 다양한 딥러닝 해보기
Keras
Keras 설치
Keras로 MNIST 테스트해보기
Keras로 비만도 판정해보기
5-8. Pandas/NumPy 다루기
Pandas/NumPy
데이터 조작
Pandas/Numpy 정리
06장: 텍스트 분석과 챗봇 만들기
6-1. 한국어 분석(형태소 분석)
형태소 분석
한국어 형태소 분석 라이브러리
출현 빈도 분석
6-2. Word2Vec으로 문장을 벡터로 변환하기
Word2Vec
Gensim 설치
Gensim의 Word2Vec으로 "토지"를 읽어보기
위키피디아 한국어 버전을 사전으로 사용해보기
위키피디아 데이터로 놀아보기
6-3. 베이즈 정리로 텍스트 분류하기
텍스트 분류
베이즈 정리
나이브 베이즈 분류
베이지안 필터 사용해보기
6-4. MLP로 텍스트 분류하기
MLP로 텍스트 분류하기
6-5. 문장의 유사도를 N-gram으로 분석하기
문장의 유사도 분석
레벤슈타인 거리
파이썬으로 레벤슈타인 거리를 계산하는 프로그램
N-gram으로 유사도 구하기
6-6. 마르코프 체인과 LSTM으로 문장 생성하기
마르코프 체인과 LSTM/RNN
마르코프 체인이란?
마르코프 체인 구현하기
LSTM/RNN
6-7. 챗봇 만들기
챗봇(회화 봇)
챗봇의 구조
07장: 이미지와 딥러닝
7-1. 유사 이미지 검출하기
간단한 형태 인식 - Average Hash
7-2. CNN으로 Caltech 101의 이미지 분류하기
CNN으로 색상 있는 이미지 분류해보기
7-3. 규동 메뉴 이미지 판정하기
규동을 판정할 수 있는 PC가 좋은 PC
스크레이핑부터 시작하기
7-4. OpenCV로 얼굴 인식하기
OpenCV
얼굴을 인식하는 프로그램 만들어보기
얼굴에 모자이크 걸기
7-5. 이미지 OCR - 연속된 문자 인식하기
OpenCV로 텍스트 영역 확인하기
문자 인식 데이터 만들기
다양한 숫자 폰트 학습 시키기
부록: 개발 환경 구축
부록-1. Docker로 개발 환경 구축하기
Docker란?
Docker 설치
윈도우 10 이하에서 Docker Toolbox 설치하기
macOS에서 Docker for Mac 설치하기
부록-2. 파이썬 + Anaconda 환경 준비
파이썬 + Anaconda 이미지 다운

사용자 삽입 이미지
쿠지라 히코우즈쿠에 [저]
중학교 시절부터 취미로 하던 프로그래밍이 재미있어 다양한 것들을 만들다가 프로그래머가 되었다. 현재는 소프트웨어 기획 획사 '쿠지라한도'에서 '재미있고 도움되는 도구'를 주제로 윈도우, 안드로이드 등에서 동작하는 앱을 공개하고 있다. 대표작은 도레미로 작곡할 수 있는 음악 소프트웨어 '텍스트 음악 사쿠라'와 '일본어 기반 프로그래밍 언어 나데시코' 등이다. 2001년에는 온라인 소프트웨어 대상을 받았으며, 2004년 IPA 청소년부에서 슈퍼크리에이터로 인정을 받았고, 2010년에 OSS 공헌자 상을 수상했다. 프로그래밍의 즐거움을 전달하기 위해 매일 분투하고 있다.

윤인성 [역]
어쩌다가 책을 집필/번역하기 시작해서, 지금까지 계속해서 집필/번역하고 있다. 현재 직업 특성상 집에서 나갈 이유가 별로 없다는 것에 굉장히 만족하고 있다. 오전에는 커피, 오후에는 홍차를 마신다. 요리, 피아노, 기타, 작곡, 그림, 스컬핑 등의 취미를 갖고 있다. 그림 취미로 ≪인공지능을 위한 수학(프리렉, 2018)≫의 표지를 그리기도 했다. 소개말을 쓰는 시점을 기준으로 이 책은 49번째 작업 및 참여 도서이다.


=================================================================
좋은책을 발견했다.
요즘 관심이 생긴 [마르코프 체인] 에 대한 지식이 필요했는데 파이썬에 여러 기능을 한번에 공부 할수 있는 귀한책이다.
요즘 분위기상 일본책 보고 있으면 매국놈 소리 들을수 있지만.  뭔가 잘쓴 책이다 싶으면 일본인이 저자다.
다음주에 구입 예정이다.

네이버 가격비교 : [링크]

=================================================================

출처 : 위키북스


2019/10/30 16:41 2019/10/30 16:41
cURL (Client URL Library Functions)
제작자 Daniel Stenberg 의 설명을 그대로 변역하면
curl is a comand line tool for transferring files with URL syntax
커맨드라인에서 URL 문법을 사용하여 파일을 전송 프로그램
내가 원하는 주소의 페이지에서 내가 임의의 값을 넣고 그 넣은 값으로 페이지에서 리턴되는 값을 받아오는 역할을 한다.
PHP에서 cURL을 사용하려는 사람들 대부분이 아마도 HTTPS 접속 때문일 것이다.
소켓 또는 그 외 여러가지 접속방법이 있는데 굳이 cURL을 사용하는 건 속도면에서도 빠르고 HTTPS도 쉽게 접속할 수 있기 때문이다.
cURL 모듈을 서버에 설치해야 합니다.(리눅스 - curl.so, 윈도우 - php_curl.dll 확장모듈 필요)
 
cURL로 가능한 일
HTTPS certificates
HTTP POST
HTTP PUT
FTP upload
HTTP Form
cookie
authentication
 
cURL, Client URL Library Functions
curl_init : 세션 초기화, 핸들값 리턴
curl_setopt : 옵션 세팅
curl_exec : curl을 실행
curl_errno : 에러번호를 가져온다.
curl_error : 에러 메시지를 가져온다.
curl_getinfo : 상태 정보를 리턴한다.
curl_close : curl 세션을 닫는다
 
[예제1 : POST방식으로 데이터 전송(simple)]
<?
$post_data = array(
"name" => "홍길동",
"birthday" => "1980-08-20"
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, http://www.example.com);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_exec($ch);
?>
 
[예제2: POST방식으로 데이터 전송(function)]
<?
function fetch_page($url,$param,$cookies,$referer_url){
if(strlen(trim($referer_url)) == 0) $referer_url= $url;
$curlsession = curl_init ();
curl_setopt ($curlsession, CURLOPT_URL, \"$url\");
curl_setopt ($curlsession, CURLOPT_POST, 1);
curl_setopt ($curlsession, CURLOPT_POSTFIELDS, \"$param\");
curl_setopt ($curlsession, CURLOPT_POSTFIELDSIZE, 0);
curl_setopt ($curlsession, CURLOPT_TIMEOUT, 60);
if($cookies && $cookies!=\"\"){
curl_setopt ($curlsession, CURLOPT_COOKIE, \"$cookies\");
}
curl_setopt ($curlsession, CURLOPT_HEADER, 1); //헤더값을 가져오기위해 사용합니다. 쿠키를 가져오려고요.
curl_setopt ($curlsession, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\");
curl_setopt ($curlsession, CURLOPT_REFERER, \"$referer_url\");
ob_start();
$res = curl_exec ($curlsession);
$buffer = ob_get_contents();
ob_end_clean();
if (!$buffer) {
$returnVal = \"Curl Fetch Error : \".curl_error($curlsession);
}else{
$returnVal = $buffer;
}
curl_close($curlsession);
return $returnVal;
}
?>
 
[예제3 : 파일 전송]
<?
$post_data['data[0]'] = "@image/img_01.jpg";
$post_data['data[0]'] = "@image/img_02.jpg";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, http://www.example.com/upload.php);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
$postResult = curl_exec($ch);
?>
[예제4 : https 접속]
<?
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL,"https://www.test.com"); //접속할 URL 주소
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // 인증서 체크같은데 true 시 안되는 경우가 많다.
// default 값이 true 이기때문에 이부분을 조심 (https 접속시에 필요)
curl_setopt ($ch, CURLOPT_SSLVERSION,3); // SSL 버젼 (https 접속시에 필요)
curl_setopt ($ch, CURLOPT_HEADER, 0); // 헤더 출력 여부
curl_setopt ($ch, CURLOPT_POST, 1); // Post Get 접속 여부
curl_setopt ($ch, CURLOPT_POSTFIELDS, "var1=str1&var2=str2"); // Post 값 Get 방식처럼적는다.
curl_setopt ($ch, CURLOPT_TIMEOUT, 30); // TimeOut 값
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); // 결과값을 받을것인지
$result = curl_exec ($ch);
curl_close ($ch);
echo $result;
?>
 
[예제5 : curl을 이용한 Gmail 로그인]
$src = "https://".$gmailId.":".$gmailPw."@mail.google.com/mail/feed/atom";
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST,true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_USERAGENT, 'My Agent Name');
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
$res = curl_exec($ch);
curl_close($ch);
/** 결과는 Atom xml 형식이다. DOM 또는 xml 파싱 function을 이용해서 파싱하면 됩니다. **/
echo $res;
?>
 
[예제6 : cURL을 이용한 웹페이지 가져오기]
<?php
function get_content($url) {
$agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)';
$curlsession = curl_init ();
curl_setopt ($curlsession, CURLOPT_URL, $url);
curl_setopt ($curlsession, CURLOPT_HEADER, 0);
curl_setopt ($curlsession, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($curlsession, CURLOPT_POST, 0);
curl_setopt ($curlsession, CURLOPT_USERAGENT, $agent);
curl_setopt ($curlsession, CURLOPT_REFERER, "");
curl_setopt ($curlsession, CURLOPT_TIMEOUT, 3);
$buffer = curl_exec ($curlsession);
$cinfo = curl_getinfo($curlsession);
curl_close($curlsession);
if ($cinfo['http_code'] != 200)
{
return "";
}
return $buffer;
}
?>
 
curl_close
기능 : cURL 세션을 닫는다.
구문 : curl_close(resource ch)
cURL 세션을 닫고, 리소스를 비워준다. 또한 cURL 핸들은 삭제된다.
 
기능 : 마지막 에러 번호를 리턴해 준다.
구문 : curl_errno(resource ch)
만일 연산 후 어떠한 에러도 발행하지 않았다면 0(zero)을 리턴한다.
 
Error Code
There exists a bunch of different error codes and their corresponding error messages that may appear during bad conditions. At the time of this writing, the exit codes are:
1 - Unsupported protocol. This build of curl has no support for this protocol.
2 - Failed to initialize.
3 - URL malformat. The syntax was not correct.
잘못된 형식의 도메인
5 - Couldn't resolve proxy. The given proxy host could not be resolved.
6 - Couldn't resolve host. The given remote host was not resolved.
해당 도메인을 못찾는다는 뜻
네임서버가 제대로 등록되어 있는지 확인하고 도메인도 정확한지 확인할 것.
7 - Failed to connect to host.
8 - FTP weird server reply. The server sent data curl couldn't parse.
9 - FTP access denied. The server denied login or denied access to the particular resource or directory you wanted to reach. Most often you tried to change to a directory that doesn't exist on the server.
11 - FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
13 - FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
14 - FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
15 - FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
17 - FTP couldn't set binary. Couldn't change transfer method to binary.
18 - Partial file. Only a part of the file was transferred.
19 - FTP couldn't download/access the given file, the RETR (or similar) command failed.
21 - FTP quote error. A quote command returned error from the server.
22 - HTTP page not retrieved. The requested url was not found or returned another error with the HTTP error code being 400 or above. This return code only appears if -f/--fail is used.
23 - Write error. Curl couldn't write data to a local filesystem or similar.
25 - FTP couldn't STOR file. The server denied the STOR operation, used for FTP uploading.
26 - Read error. Various reading problems.
27 - Out of memory. A memory allocation request failed.
28 - Operation timeout. The specified time-out period was reached according to the conditions.
30 - FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT command, try doing a transfer using PASV instead!
31 - FTP couldn't use REST. The REST command failed. This command is used for resumed FTP transfers.
33 - HTTP range error. The range "command" didn't work.
34 - HTTP post error. Internal post-request generation error.
35 - SSL connect error. The SSL handshaking failed.
36 - FTP bad download resume. Couldn't continue an earlier aborted download.
37 - FILE couldn't read file. Failed to open the file. Permissions?
38 - LDAP cannot bind. LDAP bind operation failed.
39 - LDAP search failed.
41 - Function not found. A required LDAP function was not found.
42 - Aborted by callback. An application told curl to abort the operation.
43 - Internal error. A function was called with a bad parameter.
45 - Interface error. A specified outgoing interface could not be used.
47 - Too many redirects. When following redirects, curl hit the maximum amount.
48 - Unknown TELNET option specified.
49 - Malformed telnet option.
51 - The peer's SSL certificate or SSH MD5 fingerprint was not ok
에러 메시지) SSL: certificate subject name 'www.test.co.kr' does not match target host name 'test.co.kr'
해결1) 인증서 발급받은 주소로 호출하거나
해결2) 설정으로 제어
$soapClient->setOpt('curl', CURLOPT_SSL_VERIFYHOST, 0);
52 - The server didn't reply anything, which here is considered an error.
53 - SSL crypto engine not found
54 - Cannot set SSL crypto engine as default
55 - Failed sending network data
56 - Failure in receiving network data
58 - Problem with the local certificate
59 - Couldn't use specified SSL cipher
60 - Peer certificate cannot be authenticated with known CA certificates
인증서 신뢰 검증에 실패한 경우다. (통합인증서, 번들과 관련 있는 듯)
에러 메시지) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
해결) 신뢰 검증을 하지 않도록 설정.
상호 서버가 신뢰된다면 굳이 신뢰성을 검증하지 않아도 된다.
$soapClient->setOpt('curl', CURLOPT_SSL_VERIFYPEER, 0);
61 - Unrecognized transfer encoding
62 - Invalid LDAP URL
63 - Maximum file size exceeded
64 - Requested FTP SSL level failed
65 - Sending the data requires a rewind that failed
66 - Failed to initialise SSL Engine
67 - User, password or similar was not accepted and curl failed to login
68 - File not found on TFTP server
69 - Permission problem on TFTP server
70 - Out of disk space on TFTP server
71 - Illegal TFTP operation
72 - Unknown TFTP transfer ID
73 - File already exists (TFTP)
74 - No such user (TFTP)
75 - Character conversion failed
76 - Character conversion functions required
77 - Problem with reading the SSL CA cert (path? access rights?)
78 - The resource referenced in the URL does not exist
79 - An unspecified error occurred during the SSH session
80 - Failed to shut down the SSL connection
XX - There will appear more error codes here in future releases. The existing ones are meant to never change
 
curl_error
기능 : 그 현재의 세션에 대한 마지막 에러 메시지를 되돌려 준다.
구문 : curl_error(resource ch)
만일 cURL 연산 후 에러를 발생하면 에러메시지를 되돌려 주며, 에러가 발생하지 않으면 빈문자열을 되돌려 준다.
 
 
curl_init
기능 : 세션을 초기화하고 curl_setopt(), curl_exec() 그리고 curl_close 함수들과 함께 사용하기 위해 CURL 핸들값을 리턴해준다.
구문 : resource curl_init([string $url])
옵션 Url 매개변수가 포함되어 있다면 CURLOPT_URL 옵션은 매개변수의 값을 셋팅할 것이다.
curl_setopt()를 이용하여 셋팅할 수 있다.
리턴 : 핸들값 or False
예제 : 새로운 curl세션을 초기화하고 웹페이지를 페칭한다.
< ?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.example.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>
 
curl_exec
기능 : 세션을 싱행한다.
구문 : curl_exec(resource ch)
이 함수는 cURL 세션을 초기화하고 세션의 옵션들을 셋팅한 후에 불려져야만 한다.
본 함수의 목적은 단순히 미리 정의된 cURL 세션을 실행하기 위한 것이기 때문이다.
 
 
curl_getinfo
기능 : 특정 전송에 대한 정보를 받는다.
구문 : crul_getinfo(resource ch [, int opt])
 
 
 
curl_setopt
CURLOPT_FOLLOWLOCATION
TRUE to follow any "Location: " header that the server sends as part of the HTTP header (note this is recursive, PHP will follow as many "Location: " headers that it is sent, unless CURLOPT_MAXREDIRS is set).
FOLLOWLOCATION 옵션 설정. 위치 헤더가 존재하면 따라간다.
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, tru
 
CURLOPT_HEADER
TRUE to include the header in the output.
헤더 정보를 받기 원한다면 이 옵션을 추가한다.
VALUE : 1 OR true
curl_setopt($ch, CURLOPT_HEADER, false);
 
CURLOPT_NOBODY
TRUE to exclude the body from the output.
본문의 정보를 받기 원하지 않는다면 이 옵션을 추가한다.
CURLOPT_POST
TRUE to do a regular HTTP POST. This POST is the normal application/x-www-form-urlencoded kind, most commonly used by HTML forms.
전송 메소드를 설정한다.
VALUE : 1-POST, 0-GET
curl_setopt($ch, CURLOPT_POST,1);
CURLOPT_RETURNTRANSFER
TRUE to return the transfer as a string of the return value of curl_exec() instead of outputting it out directly.
REQUEST 에 대한 결과값을 받을 건지 체크
(WRITERUNCTION 콜백을 사용하는 대신, curl_exec 함수을 위한 반환 값으로 원격지 내용을 받는다.)
#Resource ID 형태로 넘어옴 :: 내장 함수 curl_errno 로 체크
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
CURLOPT_SSL_VERIFYPEER
FALSE to stop cURL from verifying the peer's certificate. Alternate certificates to verify against can be specified with the CURLOPT_CAINFO option or a certificate directory can be specified with the CURLOPT_CAPATH option. CURLOPT_SSL_VERIFYHOST may also need to be TRUE or FALSE if CURLOPT_SSL_VERIFYPEER is disabled (it defaults to 2).
인증서 체크같은데 true 시 안되는 경우가 많다.
default 값이 true 이기때문에 이 부분을 조심 (https 접속시에 필요)
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
CURLOPT_PORT
An alternative port number to connect to.
CURLOPT_SSLVERSION
The SSL version (2 or 3) to use. By default PHP will try to determine this itself, although in some cases this must be set manually.
SSL 버젼 (https 접속시에 필요)
curl_setopt ($ch, CURLOPT_SSLVERSION,3);
 
CURLOPT_TIMEOUT
The maximum number of seconds to allow cURL functions to execute.
REQUEST 에 대한 결과값을 받는 시간타임 설정한다.
curl_setopt($ch, CURLOPT_TIMEOUT,100);
CURLOPT_POSTFIELDS
The full data to post in a HTTP "POST" operation. To post a file, prepend a filename with @ and use the full path.
POST 메소드라면 파라미터 값들을 이 옵션에 정의하면 된다.
curl_setopt($cu, CURLOPT_POSTFIELDS,$vars); // 보낼 데이타 형식은 GET 방식으로 설정
ex) $vars = "arg=$arg1&arg2=$arg2&arg3=$arg3";
CURLOPT_REFERER
The contents of the "Referer: " header to be used in a HTTP request.
리퍼러 정보를 설정
CURLOPT_URL
The URL to fetch. This can also be set when initializing a session with curl_init().
접속할 url정보를 설정
curl_init()에서 url를 설정하면 별도 설정이 필요없다.
curl_setopt($ch, CURLOPT_URL, 'http://www.exsample.com');
CURLOPT_USERAGENT
The contents of the "User-Agent: " header to be used in a HTTP request.
에이전트 정보를 설정
curl_setopt($ch, CURLOPT_USERAGENT,"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
2019/04/12 12:01 2019/04/12 12:01

사이트 품질 가이드

1. 사이트 품질 가이드에서 다룰 내용

  • 사이트의 품질 향상을 위하여 네이버가 제안하는 가이드

    이 품질 가이드의 목적은 사이트내의 콘텐츠가 검색 사용자의 의도에 맞게 네이버의 검색결과에 잘 노출될 수 있도록 사이트를 최적화 하고 품질을 개선하는 방법에 대한 내용을 다루고 있습니다. 가이드에서 언급하는 내용은 특정 검색엔진에 의존적인 내용이 아닙니다. 사이트를 처음 개발하거나 개편등의 작업이 있을 때 웹 표준에서 권장하는 사항만 챙긴다면 사이트를 방문하는 사용자의 콘텐츠 소비에 도움을 줄 뿐 아니라 검색엔진이 콘텐츠를 구조적으로 잘 이해할 수 있는 효과를 자연스럽게 얻을 수 있습니다.

    이 가이드는 사이트가 네이버의 검색결과 상위에 노출될 수 있는지에 대한 방법에 대한 답변이 아닙니다. 모든 웹 페이지는 우선적으로 방문 사용자를 위하여 제작되어야 하며 검색엔진에만 최적화된 상태로 작성 된다면 콘텐츠 소비가 주 목적인 사용자들에게 좋은 경험을 주기가 어렵습니다.

    사이트는 목적에 맞게 방문하는 사용자의 눈높이에 맞춘 품질을 지녀야 합니다. 이와 더불어 웹 표준에서 권장하는 기술적인 사항을 준수함으로서 사이트의 품질을 자연스럽게 끌어 올리는 효과를 누려보세요. 네이버 검색과 웹마스터도구가 여러분 사이트의 방문자 유입이 증가될 수 있도록 도와 드리겠습니다.

2. 검색 로봇 수집

  • 검색 로봇 수집과 관련된 품질 항목

    검색 로봇 수집과 관련된 대표 품질 항목은 로봇룰 설정에 따른 수집 가능한 문서의 양과 올바른 XML 사이트맵과 RSS의 존재하는지 여부 입니다.

    네이버 검색결과에 노출되는 사이트의 콘텐츠는 검색로봇이 사이트를 방문하여 정보를 수집, 색인과정을 처리한 뒤 로직에 따라서 반영됩니다. 그러므로 외부 사용자에게 허용할 수 있는 콘텐츠에 대하여 네이버 검색로봇이 여러분의 사이트를 인지하고 수집할 수 있도록 웹 표준으로 지정된 로봇룰을 올바르게 지정할 필요가 있습니다. 내 사이트내에서 검색에 노출할 대상인 콘텐츠와 비 노출할 콘텐츠를 분류하여 로봇룰을 작성하는 것이 매우 중요합니다.

    로봇룰과 관련된 자세한 내용은 웹 표준 최적화 가이드 및 웹 표준 HTML 가이드를 참고하세요.

    웹 상에서는 수억 개의 사이트가 존재하며 네이버 검색로봇이 모든 사이트의 콘텐츠를 빠른 시간내에 방문하기에는 한계가 있습니다. 사이트 내에 수집되어야할 페이지들을 네이버 검색 로봇에게 알려 줄 있는 XML 사이트맵은 검색 로봇의 수집을 도와줄 수 있는 유용한 방법입니다. 또한, 사이트 내에서 새로 생성된 신규 글에 대하여 웹 표준인 RSS 를 이용한다면 최신 콘텐츠의 검색반영을 보다 빠르게 검색로봇에게 알려줄 수 있습니다.

    XML 사이트맵에 대한 자세한 내용은 웹 표준 최적화 가이드를 참고하세요.

3. 콘텐츠 관리

  • 콘텐츠 관리와 관련된 품질 항목

    콘텐츠 관리와 관련된 대표 품질 항목은 웹 페이지의 제목 및 설명이 콘텐츠 주제를 명확하게 설명할 수 있도록 지정 되었는지 여부입니다.

    사이트 제목과 설명에 대한 품질은 검색 사용자가 사이트를 잘 인지할 수 있는 매우 중요한 항목입니다. 사이트 제목과 설명이 콘텐츠를 대표할 수 있는 문구로 적용되어 사용자가 쉽게 인지할 수 있도록 작성해야 합니다. 제목과 설명이 정상적으로 적용 되었더라도 너무 길어서 한눈에 보기 어렵거나 동일한 키워드가 의미 없이 반복된다면 검색 노출에 불리하게 작용할 수 있으므로 업체의 브랜드나 서비스 정보를 잘 설명할 수 있는 내용으로 간결하게 작성하는 것이 좋습니다.

    자세한 내용은 웹 표준 HTML 마크업 가이드의 콘텐츠 항목을 참고하세요.

  • 웹 페이지의 제목을 비워두지 마세요.

    웹 페이지의 제목은 검색결과의 첫번째 행에 나오는 중요한 정보입니다. 만약 사이트의 제목이 비워져 있거나 품질에 문제가 있다면 검색엔진은 페이지 내의 정보중 가장 적절한 것을 자동 추출하거나 해당 페이지를 링크한 앵커 텍스트를 활용하여 가장 적합한 내용을 판단하여 검색결과에 노출합니다. 검색 사용자가 여러분의 콘텐츠를 잘 찾을 수 있도록 명확하고 고유한 제목을 기입해주세요.

    자세한 내용은 웹 표준 HTML 마크업 가이드의 콘텐츠 항목을 참고하세요.

  • 사이트 내의 모든 페이지를 동일한 제목으로 넣지 마세요.

    웹 페이지의 제목은 고유해야 합니다. 페이지 콘텐츠에 맞는 고유한 제목을 기입해야 검색 사용자가 여러분의 콘텐츠를 찾을 가능성이 높아집니다. 검색 사용자가 정보 탐색을 위하여 검색어를 입력시 여러분 사이트의 콘텐츠가 동일한 제목으로 나열된다면 사용자의 선호도 측면에서 불리할 수 있습니다. 콘텐츠의 주제에 맞는 고유한 제목을 기입하는 것은 사이트 품질 향상을 위한 가장 중요한 작업입니다.

    네이버의 웹문서 검색 탭에서 site: 질의를 활용하여 내 사이트의 주소를 넣어보세요. 검색 결과에 노출되는 문서가 동일한 제목으로 나온다면 웹 페이지의 title 태그가 비워져 있거나 동일한 내용으로 채워져 있는지 확인해 볼 필요가 있습니다.


4. 사이트 구조

  • 사이트 구조와 관련된 품질 항목

    사이트 구조와 관련된 대표 품질 항목은 웹 페이지의 HTML이 검색엔진이 이해할 수 있는 구조로 작성되어 있는지 여부입니다. 웹 페이지가 훌륭한 콘텐츠로 채워져 있더라도 검색엔진이 이해할 수 없는 구조로 표현되어 있다면 품질평가에 불리하게 작용 될 수 있습니다. 사이트 개발 담당자와 같은 전문가의 도움을 받아서 콘텐츠의 구조에 적합한 HTML을 작성해 주세요.

  • 콘텐츠의 구조를 잘 표현할 수 있는 HTML 태그를 활용하세요.

    네이버 검색엔진은 수집된 웹 페이지의 구조를 평가하는 단계에서 콘텐츠를 표현하는 HTML 태그를 항목별 분리하여 해석합니다. 사람이 보는 웹 브라우저 상에서는 문제가 없지만 기계인 검색로봇이 해석하기 어려운 대표적인 예를 살펴보면 다음과 같습니다.


    HTML <head> 태그 정보 중 잘못 사용된 예

      • 문서의 제목,설명 태그와 같이 웹 문서의 콘텐츠를 요약할 수 있는 정보가 없는 경우
    <title></title>
    <meta name="description" content="">

    <-- 웹서버는 utf-8 방식의 인코딩을 사용하지만 meta 태그의 charset 값은 euc-kr 인코딩 방식으로 지정-->
    <meta charset="euc-kr">

    HTML <body> 태그 정보 중 잘못 사용된 예

      • 콘텐츠의 내용이 <frame> 태그로 지정되어 있는 경우
    <frame src="https://webmastertool.naver.com">

      • <head> 태그내에 존재해야 하는 정보가 <body> 태그내에 있는 경우
    <body>
    <title> 제목은 head 태그 내부에 존재해야 합니다.</title>
    </body>

      • 링크 표현시 javascript를 사용하여 해석을 어렵게 만든 경우
    <a href="#" onclick="javascript:goto(A)">웹마스터도구</a>
  • 사이트의 링크에 앵커 텍스트를 사용해주세요.

    사이트의 링크 관리는 사이트의 방문자 뿐만이 아니라 검색엔진의 입장에서도 매우 중요합니다. 링크에 사용된 앵커 텍스트를 통하여 사용자는 사이트내의 원하는 콘텐츠를 탐색하는데 도움을 받을 수 있으며, 검색엔진은 앵커 텍스트를 통해서 링크된 문서의 함축적인 내용을 이해하고 링크를 직접 방문하여 수집에 활용합니다.


    앵커 텍스트란?

      • 웹 문서에서 다른 웹문서나 사이트를 소개하는 링크에 사용되는 텍스트 또는 키워드
    <a href="https://webmastertool.naver.com/">웹마스터도구</a>

    앵커 텍스트는 링크된 문서를 가장 잘 표현할 수 있는 간결한 텍스트를 사용하는 것을 권장합니다. 문서와 연관된 앵커 텍스트의 적절한 사용은 사용자의 이탈율을 줄이고 문서 만족도를 높히는 효과가 있습니다. 하지만 검색 상위 노출을 목적으로 동일한 키워드를 앵커 텍스트로 사용하는 경우 검색 노출에 불이익을 받을 수 있으니 주의해야 합니다.

    이미지 alt 속성이란?

      • 이미지가 브라우저에서 표시할 수 없는 환경에서 이미지를 대체할 수 있는 텍스트
    <img src="images/webmaster-main.jpg" alt="웹마스터도구 메인 이미지">

    문서내 이미지의 경우도 alt 속성을 활용하여 이미지를 대체할 수 있는 텍스트로 표현할 수 있습니다. 이 정보는 검색엔진이 해당 이미지를 이해하는데 도움울 줄 수 있으며 이미지 검색결과에 활용할 수 있는 매우 중요한 정보로 간주합니다. 앵커 텍스트와 마찬가지로 이미지 alt 속성도 검색 상위 노출을 목적으로 동일한 텍스트를 사용한다면 불이익을 받을 수 있으니 이미지를 표현할 수 있는 명확한 텍스트를 지정해 주세요.

5. 사이트 활성화

  • 사이트 활성화와 관련된 품질 항목

    사이트 활성화와 관련된 대표 품질 항목은 검색에 반영되는 콘텐츠의 양과 사이트에 대한 외부 평판으로 나눌 수 있습니다. 활성화 지표를 높이기 위해서는 사이트의 목적에 맞는 콘텐츠의 지속적으로 발행하여 방문자의 유입을 증가시켜야 하며, 권위 있는 웹 페이지에 여러분의 사이트가 자연스럽게 인용될 수 있도록 홍보하는 노력을 기울어야 합니다.

  • 웹 페이지 검색 반영이 누락되지 않게 하기 위한 방법

    사이트의 콘텐츠가 많더라도 검색로봇이 수집을 못하여 색인이 안되는 경우 검색 노출이 불가능합니다. 검색 로봇이 수집을 잘 할 수 있도록 XML 사이트맵을 제출하는 것부터 시작하여 문서내의 링크를 검색엔진이 잘 해석할 수 있도록 구성하는 것이 중요합니다.

  • 사이트 평판은 어떻게 향상시킬 수 있나요?
    백링크 구성

    사이트의 내부 링크 구성도 중요하지만 신뢰할 수 있는 외부 사이트에서 여러분의 콘텐츠가 링크로 언급되는 것이 가장 중요합니다. 예를들어, 특정 문서가 동일 사이트내의 다른 웹 페이지에서 10개의 링크로 언급 되는 것보단 10개의 다른 사이트에서 언급되는 것이 신뢰도 측면에서 유리하다고 판단할 수 있습니다. 다만, 외부링크의 언급 빈도를 높히기 위하여 의도적으로 만들어진 사이트에서 여러분의 사이트가 언급이 된다면 검색 노출시 불이익을 받을 수 있으니 주의 해야 합니다.

    네이버 내의 다양한 서비스에서 여러분의 사이트를 언급할 수 있는 다양한 방법이 존재합니다. 네이버는 비즈니스 목적으로 활용할 수 있는 다양한 무료 도구와 블로그, 카페 등의 커뮤니티 공간을 무료로 제공하고 있습니다. 이러한 서비스를 활용하여 여러분의 사이트가 보다 많은 사용자에게 확산될 수 있도록 노력해 주세요.

    사이트 평판 향상의 전제조건은 사이트의 목적에 맞는 양질의 콘텐츠를 지속적으로 관리하는 것입니다. 사이트 방문자를 통해서 양질의 콘텐츠가 자연스럽게 외부 웹 페이지에 인용된다면 여러분의 사이트 평판도 자연스럽게 향상될 수 있습니다.

2018/08/19 21:48 2018/08/19 21:48
데모 : https://youngsam.net//PHP/N/naver_shop.php

파일명 :naver_shop.php

================================================


<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="nofollow" target="_blank"> 
​ 
    <meta charset="UTF-8"> 
    
        <div class="container" > 
<div class="row" style="padding:20px;"> 
<div class="panel panel-default"> 
  <div class="panel-heading"><h3><b>네이버쇼핑 검색</b></h3></div> 
  <div class="panel-body"> 
<form action="naver_shop_data.php" method="post"> 
<div class="col-lg-6"> 
    <div class="input-group"> 
      <input type="text" class="form-control" type="text" name="aa" required placeholder="[나노엔] 이라고 검색"> 
      <span class="input-group-btn"> 
        <button type="submit" class="btn btn-default">검색</button> 
      </span> 
    </div> 
</div> 
</form>  
 </div> 
 </div> 
 </div> 
 </div>



파일명 : naver_shop_data.php

================================================
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> 
  
    <meta charset="UTF-8"> 
    
    <script type="text/javascript"> 
  function goBack(){ 
      window.history.back(); 
  } 
</script> 
    
        <div class="container" > 
<div class="row" style="padding:20px;"> 
<button type="submit" class="btn btn-default" value="다시검색" onclick="goBack();" >다시검색</button> 
<p> 
<?php 
@header("Cache-Control:no-cache, must-revalidate"); 
@header("Content-Type: text/html; charset=utf-8"); 
class NaverProxy { 
  public function queryNaver($query, $target) { 
  $client_id = "client_id  값 넣기"; 
  $client_secret = "client_secret 값 넣기"; 
 $query=urlencode($_POST['aa']); 
 $target="shop"; 
 $url = "https://openapi.naver.com/v1/search/shop.xml"; 
 $url = sprintf("%s?query=%s&display=50&start=1&sort=sim&target=shop", $url, $query); 
 $is_post = true; 
 $ch = curl_init(); 
 curl_setopt($ch, CURLOPT_URL, $url); 
// curl_setopt($ch, CURLOPT_GET, $is_post); 
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
 $headers = array(); 
 $headers[] = "X-Naver-Client-Id: ".$client_id; 
 $headers[] = "X-Naver-Client-Secret: ".$client_secret; 
 curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 
 $data = curl_exec ($ch); 
 curl_close ($ch); 
 return $data; 
  } 
$naverproxy = new NaverProxy(); 
// XML파일에서 원하는 항목만 추출하기 http://search.naver.comNaver Search ResultThu, 25 Jan 2018 13:05:39 +09001764410110 
//echo $naverproxy -> queryNaver($_POST['query'], $_POST['target']); 
$xmlstring = $naverproxy -> queryNaver($_POST['query'], $_POST['target']); 
$xml = simplexml_load_string($xmlstring) or die("에러: 객체를 생성할 수 없습니다"); 
$items = $xml->channel->item; 
if(!empty($items)){ 
foreach($items as $item){  
    echo ' 
    <div class="panel panel-default"> 
  <div class="panel-heading"><h3><b><a href="' . $item->link . '" target="_blank">'. $item->title . ' </a></b></h3></div> 
  <br> 
  <div class="row"> 
  <div class="col-md-4" style="text-align: center;"> <a href="' . $item->link . '" target="_blank"><img src='. $item->image . ' width="200px" height="200px" /></a></div> 
  <div class="col-md-8"> <h4>쇼핑몰: <a href="' . $item->link . '">'.$item->mallName. '</a></h4> 
      <!--<h4>아이디: '. $item->productId . '</h4>--> 
      <h4>최저가: '. $item->lprice. '원</h4> 
      <h4>상품ID: '. $item->productId. '</h4> 
      <h4>가격: '. $item->lprice. '원</h4> 
      </div> 
</div> 
              <br> 
              </div> 
              '      
      ; 
                      
?> 
<button type="submit" class="btn btn-default" value="다시검색" onclick="goBack();" >다시검색</button> 
  </div> 
</div>



2018/08/07 14:14 2018/08/07 14:14
사용자 삽입 이미지

Atomic Email Hunter is available as a free download from our software library. Advanced, fast email extraction within the Internet. Atomic Email Hunter – Harvest email addresses from websites. Collect quality contacts and personalize your mailing lists. Create highly targeted contact lists!
Automatic email extraction from any site on the Internet
Identification of the country of the address owner using email address domain and location of extraction
Extraction of contact addresses from your email account using the Mailbox plugin
Email address search on webpages that require a login and password

사용자 삽입 이미지

Features of Atomic Email Hunter
Email extraction from a specified website
• If you have already chosen a site and want to extract email addresses from it, enter its URL-address, and the program will collect all of the email addresses available on the site. You can also retrieve addresses from pages that require a login and password.
Search for email addresses using keywords
• The program searches for sites that match specified keywords, and extracts email addresses from these sites. This allows you to reach your target audience if you do not have a list of relevant sites to search for email addresses.
Search for emails on a website by keywords
• Enter the web address and a keyword by which to conduct a search. The program will find all pages of the website that have the keyword. Email addresses will be extracted from these pages. The search can be limited to specific countries.
Mailbox plugin
• The Mailbox plugin is used to search for email addresses in your email account. The program scans all messages in the mailbox and retrieves the addresses of those people whom you have corresponded with, as well as email addresses mentioned in text messages.
Craigslist plugin (New!)
• The Craigslist plugin is developed to extract email addresses from www.craigslist.org. The email address extraction process will run according to your chosen keyword. You can also select the categories that you are interested in searching.
Detection of country of origin (New!)
The program can guess what country an email address owner lives in, using the:
• domain (if, for example, a person has a mailbox ending in mail.ru, there is a high probability that he is from Russia)
• webpage from which the email address was extracted (for example, if the email address was found on a page ending in .dk, the owner is likely to be from Denmark)
LinkedIn plugin (New!)
• This plugin is developed to extract email addresses from the social network LinkedIn. All you need to obtain the necessary addressesis to select the keyword, region and category.
2018/08/04 18:55 2018/08/04 18:55
가끔 배열을 사용하다보면 기존배열의 중간이나 특정 사이에 값을 제거해야 할 경우가 생깁니다.
그럴경우에는 아래의 함수를 이용해서 원하는 값을 제거 할 수 있습니다.

<?php
// 배열, 삭제할 값
function arr_del($list_arr, $del_num) {
$key = array_search($del_num, $list_arr); //배열에 키를 알아오고
array_splice($list_arr, $key, 1); // 배열에서 위에서 받아온 키를 삭제
return $list_arr;
}
$arr = array('AAA','BBB','CCC','DDD','EEE');
$result_arr = arr_del($arr, 'CCC'); // 해당 배열에서 CCC를 제거
print_r($result_arr);
?>

결과 

Array ( [0] => AAA [1] => BBB [2] => DDD [3] => EEE )
2018/08/03 19:31 2018/08/03 19:31
서치엔진은 검색결과에 따른 순위 부여에 있어서 나름대로의 방식으로 가중치를 부여하고 있기 때문에 동일한 키워드 조합으로 홈페이지를 등록하더라도 검색순위에 있어 서로 다른 순위가 나타난다. 
 
그러나 이러한 점을 염두에 두더라도 다양한 검색 우선순위에 있어서 공통적으로 중요시 여기는 항목을 채크함으로서 인터넷 마케팅과 홍보에 있어 탁월한 효과를 이루어 낼 수 있다.
 
이제 Search Engine에서 상위리스트에 올리는 방법을 알아보기로 하자.
 
 
 
\'Description tag\' 의 내용선택
 
<META NAME="description" CONTENT="키워드 나열방법보다는 웹페이지의 내용을 요약설명하되 핵심내용을 먼저 쓰고 부가설명은 나중에 위치시킨다."> 
Search Engine은 검색 결과를 출력할 때 해당 web page에 대한 설명을 하기 위해 page 내용이 요약되어 있는 description tag의 내용을 참고하기 때문에 이 부분은 인터넷 사용자들이 해당 web page 방문여부를 결정하는데 결정적인 영향을 주고 있다. 키워드가 되는 단어들을 의미 없이 나열하지 말고 해당 web page의 내용을 요약 하는 방식이 좋다.
 
 
 
\'Description tag\'의 길이 제한
 
<META NAME="description" CONTENT="공백포함 150자 이내">
 
각 Search Engine별로 길이 제한이 다르기 때문에 모든 Search Engine에서 서술한 내용이 모두 보여기지기를 원한다면 공백을 포함하여 150자 이내로 하는 것이 좋다.
 
그 이상의 내용을 쓰고자 한다면 먼저 150자 이내에 가장 핵심적인 내용을 쓰고 그 후에 부가적인 설명을 하도록 하는 것이 좋다. 
 
 
 
\'Keywords tag\'  키워드의 선택
 
어떤 Search Engine 들은 index 저장을 위해 할당된 디스크 공간을 절약하고 검색속도를 빠르게 하기 위해 "internet" 이나 "web"등과 같이 흔히 사용되는 몇몇 단어들(Stop Words)에 대해서는 index 시 이를 포함시키지 않거나 또는 검색자가 검색을 실시할 때 해당 단어에 대한 검색은 생략하고 있다.
 
이와 같은 stop word를 keyword로 설정하였을 경우 index에 포함되지 않기 때문에 page 순위 향상에 아무런 도움이 되지 않기 때문에 이에 대한 해결책으로 "web design" 과 같은 형식으로 단어를 " " 로 묶어서 처리하여야 한다.
 
즉 "internet", "web" 과 같은 너무 흔한 키워드는 robot이 인식하지 않기 때문에 효과가 없으며, 문서의 성격과 관련이 높은 키워드를 선택함으로서 표적고객을 확보할 수 있다.
 
그러나 역발상으로 \'amazon\', \'yahoo\', \'sex\' 와 같이 많은 사람들이 즐겨 검색에 사용하는 유인키워드를 입력함으로서 다양한 사람들의 방문을 유도하는 방법들이 활용되기도 하는데, 이러한 경,우에도 글자색을 배경색과 일치시키는 Font Matching 방법이 자주 적용되어진다.
 
 
 
\'Keywords tag\' 단어의 개수 제한
 
키워드는 200개 이하의 숫자가 적합한데 그 이상의 키워드를 입력하였을 경우 penalty를 받게 되므로 이에 주의하여야 한다.
 
 
 
조합형 Keyword 활용 
 
홈페이지를 명확하게 설명할 수 있는 키워드를 선택한 후에는 이를 그대로 키워드로 기입하지 말고 조합형 키워드로 새롭게 구성하여 추가하는 것이 좋다.
예를 들자면 keyword로 "우표", "수집"과 같이 단일형 키워드만으로 구성하는 것 보다는 "우표 수집"과 같이 조합형 키워드를 추가로 활용하는 것이 필요하다.
 
 
 
조합형 키워드의 배열 
 
조합형 키워드의 배열은 "우표수집", "우표", "수집"의 순서로 배열하는 것이 좋으며 조합형 키워드의 반복에 있어서도 단어별 반복보다는 교차반복을 하는 것이 좋다.
즉 "우표수집", "우표", "수집", "우표수집", "우표", "수집", "우표수집", "우표", "수집"과 같은 방식으로 교차하여 반복하는 것이 좋으며\' "우표수집", "우표수집", "우표수집", "우표", "우표", "우표", "수집", "수집", "수집" 과 같은 방식의 반복은 penalty를 받게 될 가능성이 있다.
 
 
 
\'Keyword\' 내에 동일 단어 반복 횟수
 
일반적으로 keyword내에 동일 단어가 7개 이상 반복되면 panelty가 적용되는데 Search Engine마다 그 기준이 다르기 때문에 모든 Search Engine에 등록되기를 원한다면 3번 이상 반복하지 않는 것이 좋다. 
 
 
 
\'Title\' 내의 키워드 위치  - <title> 키워드 </title>
 
모든 search engine은 web page의 title 에 keyword가 나타날 경우 높은 가중치를 부여하고 있다.
따라서 홈페이지의 타이틀 부분 즉 <title>과 </title> 사이에 반드시 키워드를 입력하여야 하며 해당 page의 가장 처음 부분 가까이에 keyword를 위치시킴으로써 높은 우선 순위를 보장받을 수 있다.
 
 
 
문서내의 키워드의 빈도    - <body> 키워드 </body>
 
모든 Search Engine은 페이지내에 keyword가 기타 다른 단어와 비교하여 얼마나 높은 빈도를 보이는 가를 분석하기 때문에 문서부분 즉 <body>와 </body> 사이에 Keyword 빈도를 높임으로써 해당 page를 높은 우선 순위에 올릴 수 있다. 
 
 
 
주의 : Keyword Spamming 
 
그러나 이러한 점을 악용하여 keyword의 빈도를 높이기 위해 page내에 배경색상과 동일한 keyword(Font Matching)를 수백개 이상씩 입력하게 됨에 따라 Search Engine들은 web page내 일정한 횟수 이상의 keyword가 나타날 경우 spam으로 간주하고 패널티를 적용하여 순위를 깍거나 robot이 index 대상에서 제외시키도록 하고 있다.
 
 
 
Link Popularity 
 
WebCrawler와 같은 몇몇 Search Engine들은 해당 web page가 얼마나 많은 다른 외부의 web page에 의해 링크되어 있는가를 판별하여 우선순위를 결정하기도 하는데 이를 Link Popularity라 한다.
 
이와 더불어 새롭게 나타나는 경향 중 하나는 홈페이지의 엘리트 그룹화다. 위와 같은 방법 등을 써서 검색엔진에서 1∼10등을 차치한 사이트들이 소위 동맹을 맺는 방식이다. 이 사이트들은 서로 자기들끼리 링크하기 때문에 1등부터 10등 중 어느 사이트로 들어와도 링크만 따라간다면 방문자는 이들 사이트 모두를 방문하게 되는 것이다. 이들 10개 사이트 중 마음에 드는 것이 있으면 자기 홈페이지에 링크시키게 된다. 
 
이런 일이 반복되면 탑 텐 사이트들은 그 키워드의 중심 축이 된다. 한번 중심 축으로 자리 잡으면 검색엔진의 랭킹에서도 유리하다. 알타비스타와 같은 검색엔진은 다른 홈페이지에 링크가 많이 되면 될수록 랭킹을 올려주기 때문이다. 
 
다른 사이트에 링크가 많이 되어 있으면 그만큼 인기있는 사이트로 여기는 탓이다. 참고로 자기 홈페이지가 인터넷에서 얼마나 링크되어 있는지 알려면 알타비스타에서 \'링크\'(link) 명령어를 쓴다. 키워드 난에 다음과 같이 적고 \'서치\' 버튼을 누른다. 
 
  link:자기 홈페이지 주소나 도메인 예) link:altavista.com   link:altavista.com/inchul/sin, link:altavista.com/inchul/sin/epgi.html 
 
 
 
 
페이지의 갱신정도 
 
일부 서치엔진은 page가 갱신되는 정도에 따라 robot의 방문률이 높아지도록 설정하였기 때문에 가급적이면 페이지를 자주 갱신하는 것이 변경된 페이지 정보에 대한 명확한 전달이 가능하다.
 
 
 
 
복수형 키워드 (영어키워드의 경우)
 
영어로 작성된 키워드의 경우 단수형 단어 보다는 복수형의 단어를 활용하는 것이 좋다.
예를 들어 "stamp"를 키워드 보다는 "stamps"와 같이 복수형태의 키워드를 이용하는 것이 좋다. 
이와 같은 이유는 stamps를 키워드로 사용하면 stamp 및 stamps에 대한 검색 모두에 리스트 될 수 있지만 stamp를 사용하면 stamps를 검색어로 사용했을 때 제외될 수 있기 때문이다.
 
 
 
다양한 키워드 사용
 
자신의 페이지에 적합한 키워드를 집중적으로 기록함으로서 해당 키워드 검색시 높은 순위에 올려질 가능성이 많다. 하지만 순위는 다소 떨어질지라도 다양한 키워드를 입력함으로서 다양한 항목의 검색리스트에 올려질 가능성이 높아진다고 할 수 있다.
 
 
 
Headline Tag의 이용 <H1>
 
키워드를 <H1>과 같은 Headline tag를 활용함으로서 검색리스트 에 있어 높은 순위를 설정받을 수 있다. 
 
 
 
KeyWord GateWay
 
이외에도 무료홈페이지서비스를 이용하여 유인페이지를 작성한후 유인페이지내에 메타태그 정보 와 키워드를 구성한후 다음과 같이
 
<META HTTP-EQUIV="Refresh" CONTENT="5;URL=자신의 홈페이지 URL">
 
메타태그를 구성하면 검색로봇이 유인페이지를 인식하여 검색결과를 보여주면 자동으로 5초후에 자신의 메인페이지로 이동하는 KeyWord GateWay도 메타태그를 활용한 프로모션방법으로 많이 활용되고있다. 
 
대부분의 유명 웹프로모션회사들은 이러한 KeyWord Gateway를 자사의 서버에 만든후 검색순위관리와 페이지구성을 매주 새롭게 갱신시켜주고있다.
 
이러한 KeyWord Gateway는 성인사이트에서 서치엔진, 뉴스그룹, 배너익스체인지를 통하여 사이트를 홍보한후 방문자들을 유인하는 방법으로 많이 쓰이고있다.
 
2018/08/03 11:24 2018/08/03 11:24
브라우저 매칭순서
1. Firefox
2. IE 11
3. IE 10~6
4. Edge
5. inapp : Kakaotalk , Naver , Facebook
6. Chrome
7. Safari
OS 매칭 순서
1. Windows
2. Android
3. iPhone , iPad , iPod
4. Machintosh
Android
Mozilla/5.0 (Linux; Android 4.4.2; ko-kr; IM-A880S Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
Android  Chrome
Mozilla/5.0 (Linux; Android 4.4.2; ko-kr; IM-A880S Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
Android  Naver App
Mozilla/5.0 (Linux; Android 6.0.1; SM-G930S Build/MMB29K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36 NAVER(inapp; search; 510; 7.6.2)
Adroid  KakaoTalk
Mozilla/5.0 (Linux; Android 6.0.1; SM-G930S Build/MMB29K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36;KAKAOTALK 1400258
iPhone  Safari
Mozilla/5.0 (iPhone; CPU iPhone OS 10_1_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B100 Safari/602.1
iPhone  Chrome
Mozilla/5.0 (iPhone; CPU iPhone OS 10_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/55.0.2883.79 Mobile/14C92 Safari/602.1
iPhone  KakaoTalk App
Mozilla/5.0 (iPhone; CPU iPhone OS 10_1_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Mobile/14B100 KAKAOTALK 5.8.5
iPhone  Naver App
Mozilla/5.0 (iPhone; CPU iPhone OS 10_2 like Mac OS X) AppleWebKit/602.3.12 (KHTML, like Gecko) Mobile/14C92 NAVER(inapp; search; 550; 7.6.4; 7PLUS)
iPhone  Facebook App
Mozilla/5.0 (iPhone; CPU iPhone OS 10_2 like Mac OS X) AppleWebKit/602.3.12 (KHTML, like Gecko) Mobile/14C92 [FBAN/FBIOS;FBAV/75.0.0.48.61;FBBV/45926345;FBRV/0;FBDV/iPhone9,4;FBMD/iPhone;FBSN/iOS;FBSV/10.2;FBSS/3;FBCR/SKTelecom;FBID/phone;FBLC/ko_KR;FBOP/5] 
iPad  Safari
Mozilla/5.0 (iPad; CPU OS 9_3_5 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13G36 Safari/601.1 
iPod
BalckBerry
Nokia
SonyEricsson
webOS
PalmOS
Macintosh  Safari
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0.2 Safari/602.3.12 
Macintosh  Chrome
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
PC  FireFox
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0
PC  Chrome
Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36
PC  Safari
Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2
PC  Edge
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
PC  Internet Explorer 11
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
PC  Internet Explorer 10
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)
PC  Internet Explorer 9
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
PC  Internet Explorer 8
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
PC  Internet Explorer 7
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
PC  Internet Explorer 6
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)

https://youngsam.net/BrowserAgentInfo.php
2018/07/25 21:20 2018/07/25 21:20
# PHP 함수: 그누보드5 파일을 보다가 나오는 함수를 php.net 등에서 메모한 것입니다.
 
* abs(): Reterns absolute value of number.
 
* @: 오류메세지를 표시하지 않겠다는 의미이다.
 
* addslashes(): Quote string with a C style. Returns a string backslashes before characters that are listed in Charleston Parameter. 
각 문자앞에 \ 를 넣는다.
 
* array_merge(): Merge one or more arrays.
 
* array_map(): Applies the callback to the elements of the given arrays.
 
*array_unique(): Remove duplicate values from an array.
 
* array_count_values(): Count all the values of an array.
 
* array_key_exists( $key, $array ): Checks if the given key or index exists in the array.
 
* array_push(): 전달된 배열의 끝에 하나의 배열요소를 추가하는 기능을 한다.
즉 array_push()로 전달된 배열의 길이는 1 만큼 늘어난다.
ᆞ$topicIDs= array() ; 
ᆞarray_push($topicIDs, $row[ 'topic_id' ] ) ;
ᆞ하나 이상의 element를 array의 마지막에 삽입한다 
ᆞ문법 :
array_push( array, value1, value2 . . . ) ;
-예 :
<body>
<?php
$a= array("red", "green") ;
array_push($a, "blue", "yellow") ;
print_r($a) ;
?>
</body>@
* basename(): Returns trailing name component of path.
파일이름과 확장자만 추출한다.
* base64_decode(): Decodes a base64 encoded data.
*줄뛰울때  echo "<br>" ; 을 넣는다.
* ceil(): Round fractions up. Returns the next highest integer value by rounding up value if necessary.
* current(): Return the current element in an array.
* count(): Count all elements in an array, or something in object.
* chmod(): Change file mode.
* chr(): Return a specific character
* crypt($str, $salt): with return a hashed string using the standard Unix DES-based algorithm
* date(): Format a local time/date.
ᆞY-m-d
ᆞY: 1999 or 2000
ᆞm: 01 to 12
ᆞd: 01 to 31
* date_default_timezone_set(): 표준 시간대를 정한다.
* define(name, value) ; 런타임 동안 named constant(상수)를 정의한다.
* dirname(): Returns the directory name from a path.
* echo "\$this is not defined.\n" ; 과
echo "\$this is not defined.<br>" ; 은 동일하게 줄을 바꾼다.
* error_reporting(): Set which PHP errors are reported.
* ereg(): Regular expression match. preg_match로 대체됨..
* eval(): Evaluates and excutes a argument.
If the argument is an expression, eval() evaluates the expressiㄷon. 
If the argument is one or more js statement, eval() excutes the statement.:(자바스크립트함수임)
* explode(): Split a string by string.
ㆍexplode( $delimiter, $string )
ㆍ예
$pizza="piece1 piece2  piece3 piece4 piece6 piece6" ;
$pieces= explode (" " ,  $pizza);
* extract($row): import variables from an array into the current symbol table 
* filesize($filename): 주어진 파일의 사이즈를 가져온다. 사이즈를 byte로 제출한다.
* file_exists(): file or directory가 있는지 여부를 체크한다.
* floor(): Round fractions down. Returns the next lowest integer value(as float) by rounding down value
 if necessary.
* filemtime(): Gets file modification time. 파일의 내용이 변화된 시간을 반환한다.
*function_exists(): Return true if the function has been defined.
* filter_var(): 이메일이 형식에맞는지 체크하는 함수이다.
* getenv(): Gets the value of an environment variable.
* get_magic_quotes_gpc(): Gets current configuration setting of magic_quotes_gpc.
* glob(): Find pathnames matching a pattern.
* headers_sent(): Checks if or where headers have been sent.
* htmlspecialchars(): 특수문자를 html실체로 바꿔준다. 예를들면 < and > 를 < 그리고 > 로바꾼다.
* hexdec(): 16진수를 10진수로 바꾸어 출력한다.
ᆞhexdec( $hex_string) 
: hex_string 인수(변환할 문자열)에 표현된 16진수와 동일한 10진수를 반환한다.
* 참고
ᆞdechex(): 10진수를 16진수로
ᆞbindec(): 2진수를 10진수로
ᆞoctadec(): 8진수를 10진수로
ᆞbase_convert(): 수를 임의의 진법으로 변환한다.
* bin2hex( ) : 바이너리 data를 16진 표현으로 변환한다.
ᆞ문법
bin2hex($str) ;
: str의 16진 표현을 갖는 아스키 문자열을 반환한다.
* implode( $glue , $pieces ): Join array elements with a string.  $glue값으로 합친다.
ᆞ$glue: 디폴트값은 공백.
ᆞ$pieces: 임플로드될 array.
* is_file( $filename ): 주어진 파일이 regular file인지를 알려주며, 파일네임이 존재하고 regular file 이면 참이고 그렇지않으면 거짓이다
ᆞ$filename : 파일의 경로이다.
* isset(): 변수가 설정되었는지 검사한다. 변수가 정해져 세팅되고 null이 되지않아야 true이다.
* include_once(): 한번만 인클루드 된다.
* in_array(): Checks if a value exists in an array.
ᆞ$os=array ("mac", "window", "irix", "linux") ;
if (in_array ( 'linux' , $os )) { 
echo "Got Linux" ; }
출력: Got Linux
 
* intval(): Get the integer value of a variable
-예: 
<?php
echo intval(42);                      // 42
echo intval(4.2);                     // 4
echo intval('42');                    // 42
echo intval('+42');                   // 42
echo intval('-42');                   // -42
?>
* json_encode(): Returns the JSON representation of value.
* list(): 리스트변수에 value값을 할당 하는 방법이다. array처럼 할당한다.
ᆞ예 :
<?php
$my_array = array( "dog", "cat", "horse" ) ;
list($a, $b, $c)= $my_array ;
echo "I have several animals a $a , a $b and a $c." ;
?>
ᆞ결과:
I have several animals a dog, a cat, and a horse.
*max(): Find highest value.
* mb_substr(문자열, 시작위치, 길이, 인코딩): 문자열에서 정해진 길이만큼 가져온다.
* move_uploaded_file(): Moves an uploaded file to an new location.
* microtime(): return current Unix timestamp with microseconds.
* mb_strtolower(): make a string lowercase.
* mkdir(): Makes directory.
* md5(): Calculate the md5 hash of a string.
* mysql_errno(): Returns the numerical value of the error message from previous mysql operation.
* mkdir(): Makes directory 
ᆞ예
mkdir( "/parh/to/dir" , 0700 )
* mt_rand(): Generate a random value via the Mersenne Twister Random Number Generator.
* mb_substr: Get part of string.
* mt_rand(): Generate a random value via the Mersenne Twister Random Number Generator.
* @mysql_query(): 해당함수가 에러가 발생해도 에러메세지를 출력하지 말라는 의미이다.
* mysql_data_seek(): Moves internal result pointer.
* myaql_affected_rows(): Get number of affected rows in previous Mysql operation.
* mysqli_connect(): mysql 서버에 연결한다.
* mysql_error(): 에러메세지를 표시한다.
* mysql_query(): 쿼리 문자열을 mysql db에 전달해 테이블에 데이타를 저장하거나 검색한다.
* mysql_select_db(): mysql db를 선택한다.
* 출력할때 echo $variables ; 이렇게한다.
* mysql_real_escape_string(): 쿼리에 영향을 줄수 있는 문자를 제거 한다.
* nl2br(): Inserts HTML line breaks before all newlines in a string.
* now(): 현재 날짜와 시간을 알려주는 함수이다.
* number_format(): Format a number with grouped thousands. 천단위로 콤마넣는다.
ᆞ문법
number_format($number, $decimals= 0, $deci_point= " . ", $thousand_sep= " , " )
ᆞ예
$number = 1234.567
number_format( $number ) : 1,234
number_format( $number , 2 ) : 1,234.56
number_format( $number , 3 , ' . '  , ' , ' )  : 1,234.567
* ob_get_level(): Return the nesting level of the output buffer mechanism.
* ob_start (): Turn on output buffering.
* ob_start(): Turn on output buffering.
* ob_get_contents(): Return the contents of the output buffer.
* ob_end_clean(): Clean(erase) the output buffer and turn off output buffering.
* ob_get_contents(): Return the contents of the output buffer.
* ob_end_clean(): Clean(erase) the output buffer and turn off output buffering.
* ord(): Return ASCII value of character.
* password_hash(): creates a new password hash and is compatible with crypt(). 따라서 password hashes created by crypt() can be used with password_hash( ).
ᆞpassword_hash($password, $algo)
* pathinfo(): 파일패쓰에 관한정보를 내보낸다.
ᆞpathinfo(path, options)
* print_r(): 변수에 대하여 사람이 읽을 수 있게 정보를 출력하라
* parse_url(): Parse a URL and return it's components.
* parse_url(): Parse a URL and return it's components.
* PHP_EOD: 줄바꿈.
* preg_match($pattern, $subject, $matches): subject가 pattern에 앚는지 검사한다. 즉, 직접 작성한 하나의 정규표현식($pattern)과 하나의 문자열($subject)을 파라메터로 제공받아 문자열이 정규식과 일치하면 true, 그렇지않으면 false 를 반환한다.
ᆞ$pattern: 검색할 패턴
ᆞ$subject: the input string.
-예-: 정규식에서 $string이 소문자로 시작하면(/^[a-z]/) 파란색으로 출력하고 아니면 붉은색으로 출력하라는 의미이다.
<?php
$string = 'this is flower';
if (preg_match('/^[a-z]/', $string)) {
    echo '<font color="blue">' . $string . ' is little capital string.</font><br />' . PHP_EOL;
}
else {
    echo '<font color="red">' . $string . 'is not little capital string.</font><br />' . PHP_EOL;
}
?>
출력: this is flower is little capital string.
* preg_replace(): 문자열의 유효한 패턴을 확인하고 다른 문자열로 대체한다(perform a regular expression search and replace.)
ᆞ문법: preg_replace($pattern, $replacement, $subject ): subject를 pattern에 맞는지 검사하여 replacement로 대체한다.
ᆞpattern: 검색할 패턴으로 string이나 string을 가진 array가 될수있다.(대체해야할 원하지 않는 문자를 지정한다)
ᆞreplacement: 대체할 string이나 string을 가진 array. 이 문자열로 바뀜(원하지 않는 문자를 이 문자로 대체한다.)
ᆞsubject: 바뀌게 될 문자열(유효성검사 및 대체작업을 할 문자열을 지정한다)
- 예: 2000에서 2009를 2010으로 바꾼다.
$new_year = preg_replace( ' / 200 [ 0-9 ] / ' , ' 2010 ' , ' The year is 2009. ' ) ;
출력: The year is 2010.
* preg_split(): Split the given string by a regular expression.
* print_r(): Prints human readable information about a variable.
* rand($min , $max): 정수 난수를 생성. Generate a random integer. min, max값이 없으면 0과 getrandmax()값 즉 10자리수 값 사이의 임의의 수를 반환한다.
* reset(): Set the internal pointer of an array to its first element.
* rand(): Generate a random integer.
* round(): Rounds a float.(소수 반올림)
* $row= $stmt -> fetch(PDO : : FETCH_ASSOC): read row
* $REMOTE_ADDR(): PHP 전역변수로서 접속자의 IP정보를 저장하고있다.
* session(): 여러 페이지에 걸쳐 사용되는 변수에 정보를 저장하는 방법이다.
ᆞ세션변수는 하나의 유저에 대한 정보를 가진다.
ᆞ session_start(): <html>태그에 앞서 맨앞에 넣는다.
* session_destroy(): Destroys all data registered to a session.
* session_register():  Register one or more global variables with the current session
* setcookie(): Send a cookie.
ㆍsetcookie() defines a cookie to be sent along with the rest of the HTTP headers. Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output, including <html> and<head> tags as well as any whitespace.
*set_time_limit(): Limits the maximum execution time.
* session_register(): Register one or more global variables with the current session.
  
* strval(): Get string value of a variable.
* strlen(): Get string length. 주어진 string의 길이를 반환한다. 공백도 한개의 자리를 차지한다.
예:
<?php
$str = 'abcdef';
echo strlen($str); 
echo '<br>';
$str = ' ab cd ';
echo strlen($str); 
?>
출력: 
6
7
* session_register(): Register one or more global variables with the current session.
# SHA(): 사용자의 암호를 40개의 문자로 암호화해서 db에 저장한다.
php함수가 아닌 mysql함수이기 때문에 쿼리안에서 호출한다.
ᆞ예 :
INSERT INTO mismatch_user 
(username, password, join_date)
VALUES( 'nettles' , 'SHA('tatlover')' , NOW() ) ;
SELECT * FROM mismatch_user WHERE 
password= SHA('tatlover') ;
* SHA(), MD5()는 mysql에서 제공하는 암호로 SHA()가 더 안전하다.
* php에서도 같은 기능의 sha1(), md5() 암호를 제공하는데 쿼리가 아니고 php코드에서 사용한다
* sha1(): calculates the SHA-1 hash of a string.
ᆞ예:
<?php
$str= "Hello" ; 
echo sha1($str) ;
?>
ᆞ결과
f7ff9e ~ abf0: 디폴트값으로 40자리가 반환된다.
 
 
* sprintf(): Return a formatted string
-영카트예: 주소출력
            <div class="my_info_wr ov_addr">
                <strong>주소</strong>
                <span><?php echo sprintf("(%s%s)", $member['mb_zip1'], $member['mb_zip2']).' '.print_address($member['mb_addr1'], $member['mb_addr2'], $member['mb_addr3'], $member['mb_addr_jibeon']); ?></span>
            </div>
 
* str_replace(A, B, C): C안에 있는 문자중에서 A를 B로 바꾼다.
* substr_count(): Count the number of substring occurrence.
ᆞ문법
substr_count( $haystack, $needle ): 부분 문자열이 몇번사용된 .지 검사한다.
ᆞ예
$text=' this is a test and that is ' ;
echo substr_count( $test, 'is' ) ;
출력: 3
* strlen(): Get string length. returns the length of string. 공백도 문자와 같이 취급한다.
* strpos(): Find the position of the first occurrence of "php" inside the string.
* substr( string , start , length ): 전체문자열 중에서 일부만 선택 
ᆞstring: 추출하려는 문자열이 포함되어 있는 원본 문자열을 지정한다.
ᆞstart: 추출하려는 문자열의 시작 지점을 지정한다.
ᆞlength: 추출하려는 문자열의 길이를 지정한다.
ᆞ공백도 문자하나를 차지한다.
 예:
ᆞ$job_desc = 'Are you a practioner of the lost art of cat juggling?' ;
ᆞsubstr( $job_desc, 4, 3 ) ;  출력: you
ᆞsubstr( $job_desc, 49 ) ; -- 마지막파라메타를 생략함으로서 49부터 모두출력한다.
* sizeof(): This function of alias of count().
* substr(): Returns part of a string. returns the portion of string specified by the start and length parameters.
ᆞsubstr( 'abcdef' , 1 , 3 ):  bcd
ᆞsubstr( 'abcdef' , 0 , 4 ):  abed
ᆞsubstr( 'abcdef' , -1 , 1 ):  file
ᆞsubstr( 'abcdef' , 1 , 3 ):   bcd
ᆞsubstr( 'abcdef' , -4 , -1 ):  cde
ᆞsubstr( 'abcdef' , 0 , 3 ):   abc
* strstr(): Find the first occurrence of a string.
$email= '*** 개인정보보호를 위한 이메일주소 노출방지 ***' ;
$domain= strstr( $email , '@' ) ;
echo $domain ;   
echo '<br>';
$name= strstr( $email , '@' , true ) ;
echo $name ; 
출력: @gmail.com
chulyong
* set_time_limit(): limits maximum execution time.
* trim(): 앞뒤의 빈 문자열 제거한다
ᆞ$name= trim($_POST['name']) ;
ᆞ$score= trim($_POST['score']) ;
ᆞ$screenshot= trim($_FILES[' screenshot'] ['name']) ;
* unset(): destroys the specified variable.
* unlink(): Deletes a file.
* uniqid(): Generate a unique ID.
* var_dump(): type과 value값을 가지는 하나 또는 여러개의 변수를 한꺼번에 타입, 밸류를 디스플레이 한다.
2018/07/25 20:45 2018/07/25 20:45
안녕하십니까

귀농 귀촌을 위해서 농가주택 시골땅이 필수적으로 필요할텐데요 

부동산 거품도 심하고 여기저기 알아보기도 힘들죠. 그래서 오늘 직거래 시골 부동산 정보 사이트를 소개 하려고 합니다.

귀농넷에서 농가주택 시골땅 거래정보를 직거래로 거래하실 수 있는 

홈페이지를 구축 했습니다.

농가주택 시골땅 정보를 이젠 실시간으로 받아보세요 

캠핑장을 위한 임야매매 오지땅 정보도 가끔 올라오니 확인 해 보시면 좋을듯 하네요 

찾으시는 시골땅 정보가 없으시다면 


글 한번 남겨보시면 금새 연락이 갈듯 하네요 

홈페이지 및 네이버밴드 주소 아래 글에 남기겠습니다








   ( 시멘트 포장까지 되어 있습니다. )추가로 귀농 정보,귀농커뮤니티,구인구직 까지 추가 개발 중입니다. 회원수도 늘어나고 있습니다. ^^



아래는 귀농넷 회원 분께서 올리신 귀농지 임야 입니다. 함께 올려요 ^^

사용자 삽입 이미지
개인사정으로 인해,
충남의 토질 좋은 임야를 매우 저렴한 가격에 급매합니다.
      ( 중개인 아니고, 개인입니다. ; 직거래 )
곧 바로 수확이 가능한
    10년생 된 밤나무가 심어져 있는 야산입니다.
     귀농 및 농사 하시기 용이하며,
     산까지 진입로가 넓게 나있습니다.

   두 땅 모두 매매하려합니다.(산46-1, 산46-6) ; 정확한 소재지는 아래 쓰여 있습니다.



사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지

보시다시피 경관이 좋고,
조용하여,
눈이 오면 눈이 오는대로, 또 푸르면 푸른대로,
아늑한 풍경을 자랑합니다.
또한 드라마 서동요와 장영실 세트장이 근접해 있습니다.
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
사용자 삽입 이미지
또한, 동네에서 거리가 꽤 떨어져 있어,
주변에 살고 있는 가구가 없어, 별 다른 분쟁이 없으며,
아늑한 분위기에,
식수, 전기 모두 완비되어 있습니다.
주택 또한 사는 데 불편함 없이 잘 마련되어 있구요.

사용자 삽입 이미지
아름다운 연못 또한 갖추고 있습니다.
(현재는 밭으로 쓰이는 답에 위치하고 있으며, 건축 가능합니다. 약278평)
또한, 물이 워낙 맑아, 
주변에 가재, 다슬기도 많이 서식하고 있습니다.
공기가 맑아, 반딧불도 있구요. 
이런식으로 올리네요. 여러분들도 이런식으로 시골땅 정보를 올리시면 됩니다. 


Hello

For the earliest villages, the rural land of the farmhouses would be essential.

Real estate bubbles are heavy and hard to find here and there. So today I am going to introduce the real estate information site in the countryside directly.



It is possible to deal with the farmland housing transaction information of the farm house in the farm net directly

I built a homepage.


Rural land information of farmhouses



It is good to check the land information of Oji Land for camping site sometimes.

If you do not have any information about the country you are looking for

If you leave a comment, you can contact me quickly.



I will post on homepage and Naverband address



Homepage http://www.gwinong.net




   (Cement packing is also available.) In addition, we are in the process of further development of the farm information, the farm community, and the job search. Membership is also increasing. ^^



The following is the re-registration site uploaded by the member of the net. I'm with you ^^



સ્વાગત

Arguenon gwichon વાડીમાં મકાનોની આસપાસનો ભૂમિભાગ ગ્રામીણ આવાસન જમીન અનિવાર્યપણે haltendeyo કરવા માટે જરૂરી છે

ગંભીર અને તે પણ રિયલ એસ્ટેટ બબલ himdeuljyo પણ અહીં અને ત્યાં જાણી શકો છો. તેથી આજે એક સીધા વ્યવહારો ગ્રામીણ એસ્ટેટ માહિતી સાઇટ રજૂ કરશે.



ચાર Arguenon સીધી વહેવાર કરે છે ગ્રામીણ હોમસ્ટેડ નિવાસી જમીન વ્યવહાર માહિતી સાથે વ્યવહાર કરી શકો છો કે

અમે એક વેબસાઇટ બનાવી છે.


હવે વાસ્તવિક સમય ખેડૂતો ગ્રામીણ આવાસન જમીન માહિતી મેળવો



ફોરેસ્ટ્રી માર્કેટિંગ માહિતી ક્યારેક છાવણી ખાતરી કરો up'm વેઠવો તમે જુઓ કે કાદવ માટે સારી પણ હોઈ

તમે માહિતી તમે ગ્રામીણ જમીન માટે જોઈ રહ્યા હોય ન હોય તો

તમે ડાબી જુઓ જો હું ટૂંક સમયમાં ફરીથી સંપર્ક galdeut લખવાનું છું



અમે લેખની હેઠળ હોમપેજ અને નાવર સરનામું બેન્ડઝ પર રહેશે



મુખ્ય http://www.gwinong.net




   વધુ માટે Arguenon માહિતી Arguenon સમુદાય જોબ ઉમેરવા વિકસાવવામાં આવી છે (તે પેકેજિંગ સિમેન્ટ છે). સભ્યો પણ વધી રહી છે. ^^



નીચે જંગલ gwinongji ચાર સભ્યો મિનિટ તમે પોસ્ટ Arguenon છે. એકસાથે મૂકો ^^
Svāgata

Arguenon gwichon vāḍīmāṁ makānōnī āsapāsanō bhūmibhāga grāmīṇa āvāsana jamīna anivāryapaṇē haltendeyo karavā māṭē jarūrī chē

gambhīra anē tē paṇa riyala ēsṭēṭa babala himdeuljyo paṇa ahīṁ anē tyāṁ jāṇī śakō chō. Tēthī ājē ēka sīdhā vyavahārō grāmīṇa ēsṭēṭa māhitī sā'iṭa rajū karaśē.



Cāra Arguenon sīdhī vahēvāra karē chē grāmīṇa hōmasṭēḍa nivāsī jamīna vyavahāra māhitī sāthē vyavahāra karī śakō chō kē

amē ēka vēbasā'iṭa banāvī chē.


Havē vāstavika samaya khēḍūtō grāmīṇa āvāsana jamīna māhitī mēḷavō



phōrēsṭrī mārkēṭiṅga māhitī kyārēka chāvaṇī khātarī karō up'm vēṭhavō tamē ju'ō kē kādava māṭē sārī paṇa hō'ī

tamē māhitī tamē grāmīṇa jamīna māṭē jō'ī rahyā hōya na hōya tō

tamē ḍābī ju'ō jō huṁ ṭūṅka samayamāṁ pharīthī samparka galdeut lakhavānuṁ chuṁ



amē lēkhanī hēṭhaḷa hōmapēja anē nāvara saranāmuṁ bēnḍajha para rahēśē



mukhya http://Www.Gwinong.Net




   vadhu māṭē Arguenon māhitī Arguenon samudāya jōba umēravā vikasāvavāmāṁ āvī chē (tē pēkējiṅga simēnṭa chē). Sabhyō paṇa vadhī rahī chē. ^^



Nīcē jaṅgala gwinongji cāra sabhyō miniṭa tamē pōsṭa Arguenon chē. Ēkasāthē mūkō ^^
2017/04/27 11:57 2017/04/27 11:57

 Type

 상태

 데이터 타입

 컨트롤 타입

 hidden

 숨김

 임의의 문자열 

 n/a 

 text 

 텍스트

 줄바꿈 없는 텍스트 

 텍스트 필드 

 search 

 검색 

 줄바꿈 없는 텍스트 

 검색 필드 

 tel  

 전화번호 

 줄바꿈 없는 텍스트  

 텍스트 필드 

 url  

 URL 

 절대 IRI

 텍스트 필드 

 email

 이메일 

 이메일 주소 or 이메일 주소 리스트 

 텍스트 필드

 password

 비밀번호 

 줄바꿈 없는 텍스트 

 데이터 입력이 나타나지 않는 텍스트 필드 

 datetime  

 날짜와 시각 

 UTC 날짜와 시각 

 날짜와 시각 컨트롤 

 date 

 날짜  

 시간대 없는 날짜 

 날짜 컨트롤 

 month 

 달 

 시간대 없는 년과 달 

 달 컨트롤

 week 

 주 

 시간대 없는 주 번호 

 주 컨트롤 

 time 

 시각 

 시간대 없는 시각 

 시각 컨트롤 

 datetimelocal 

 로컬 날짜와 시각 

 시간대 없는 날짜와 시각 

 날짜와 시각 컨트롤 

 number 

 숫자 

 숫자 값 

 텍스트 or 스피너 컨트롤 

 range 

 범위 

 숫자 값 or 정확한 숫자가 필요없는 의미상의 값

 슬라이더 컨트롤

 color 

 색 

 8-bit 적녹형 sRGB컬러  

 컬러 웰

 checkbox 

 체크박스 

 이미 설정된 리스트 값의 0 or 다른 값 

 체크박스 

 radio 

 라디오 버튼 

 지정된 값 

 라디오 버튼 

 file 

 파일 입력창 

 MIME type과 파일명이 있는 파일 목록 

 레이블과 버튼 

 submit  

 전송 버튼 

 폼 서식을 전송하는 지정된 값 

 버튼  

 image 

 이미지 버튼 

 폼 서식을 전송하는 이미지 좌표 값 

 클릭 가능한 이미지 or 버튼 

 reset 

 리셋 버튼  

-

 버튼  

 button 

 버튼 

 -  

 버튼 

 

출처: http://slreference.tistory.com/7 [reference]
2017/02/20 03:19 2017/02/20 03:19
http://piwik.org/ 
Piwik(Open source web analytics)  구글 Google Analytics와 유사합니다. 독립적으로 설치해서
여러 도메인 통계 정보 등을 파악 할수 있습니다. 설치 방법도 간단합니다.
사용하다

다른 검색 엔진은 이상이 없으나 네이버 naver  는 유니코드 문제로 한글 키워드가 제대로 안나오는 문제가 생겨
소스를 보게 되었습니다.

piwik\core\DataFiles\SearchEngines.php 파일을 열어 보시면 .

650 라인에

  // Naver
  'search.naver.com'   => array('Naver', 'query', 'search.naver?query={k}', 'EUC-KR'),
이런 소스가 보입니다.  위 라인을
  'search.naver.com'=> array('Naver', 'query', 'search.naver?query={k}'),

으로 변경하면 정상적으로 한글이 잘 보입니다.

 
2012/11/02 18:45 2012/11/02 18:45

Everything search engine

파일과 폴더 이름으로 위치를 빠르게 찾아줍니다

사용자 삽입 이미지
작은 설치 파일

  1. 깨끗하고 간결한 사용자 환경
  2. 빠른 인덱싱
  3. 빠른 검색
  4. 최소한의 시스템 자원 사용
  5. 다른 사람과 파일을 쉽게 공유
  6. 실시간 업데이트







컴퓨터 안에 있는 모든 파일을 0.1초 이내에 검색할 수 있다면 믿을 수 있나요? 하드디스크 내의 모든 파일을 DB화해서 검색하는 프로그램을 소개합니다. 첨부한 영상은 절대 빨리감기를 한 것이 아니라 원래 이 프로그램의 속도 입니다.


이 프로그램의 이름은 Everything 으로 아래 링크된 주소로 가서 내려 받은 뒤 설치하시면 됩니다.

처음 실행할 때는 하드디스크를 검색해서 DB를 생성하는 과정이 있으므로 바로 사용하실 수는 없습니다. 컴퓨터 사양에 따라 1분 내외의 시간이 지나면 동영상에서 확인하시는 바와 같이 빠른 파일 검색이 가능합니다.

언어팩도 있는 만큼 원하시는 언어로 설치해서 활용하시기 바랍니다.

프로그램 내려받기 http://www.voidtools.com/
2012/09/16 07:03 2012/09/16 07:03
<%
str = "search list"
chk = Instr(str,"list")
Response.Write chk
%>

대상 문자열에서 지정한 문자열이 있으면 몇번째에 있는지 숫자를 반환하고, 없으면 0 을 반환한다.
PHP 의 substr 과 같은 역할을 하는 함수.
주의할점은, 대소문자를 구별하므로, 대소문자가 틀릴경우 0 을 반환하며,
대소문자 구별없이 찾으려면 먼저 UCase 또는 LCase 로 변환한후 비교하여야 한다.
2012/07/23 14:27 2012/07/23 14:27
사용자가 보고 있는 브라우저 화면을 캡쳐해서 서버로 전송해서 확인하는 것.
네이버나 다음 메일에서 다른 컨텐츠 다 빼버리고 리스트만 골라서 로그인 없이 바로 내 웹페이지에서 볼 수 있는 것.
일반 링크가 아닌 자바스크립트 클릭만으로 나오는 DOM 부분의 원하는 내용을 긁어 와서 붙여넣는 것.
내 웹페이지에서 쓴 글을 네이버 카페, 다음 블로그 등에 동시에 올릴 수 있는 것.

위 항목은 현재 HTML5도 마찬가지로 일반적인 웹의 환경(ActiveX 제외)에서는 불가능합니다.
node.js 가 나오고 전세계의 개발자들이 그 기반하에 여러가지 오픈 모듈(npm)을 만들었는데 그 중에서
요즘 제 뒷통수를 강하게 때린 webdriverJS 모듈을 소개합니다.

사전 지식은 리눅스, 유닉스 기반하에 node.js를 어느정도 컨트롤 할 줄 알고 npm이 뭔지 알 정도면 됩니다.

Camilo Tapia란 외쿡 개발자가 만든 npm 모듈로서 기반은 node.js + Java Selenium + 자바스크립트
로 구성되어 있습니다.

브라우저 테스팅 툴인 Java Selenium이 설치가 되어 있어야 하며 리눅스나 유닉스에서는 standalone 버젼이
있으므로 걍 jar 파일만 실행 하면 됩니다. (자세한 사용법은 하단 URL 참고 )

작동 원리는 Java Selenium 서버에 node.js가 통신을 해서 Java Selenium과 연동을 통해 브라우저를 띄우고
wire protocol bindings으로 클릭, 캡쳐, submit 등등 브라우저 자체를 컨트롤 할 수 있습니다.

예를 들어 클라이언트 웹브라우저에서 자체 홈페이지에 들어오면 로딩하는 동시에 socket.io를 이용해서
클라이언트 pc의 URL을 node.js 서버로 전송하고 node.js에서는 Selenium 통해 브라우저를 실행시키고
Selenium 캡쳐 기능을 실행하면 서버에 이미지가 저장됩니다.

이 외에도 로그인 전용 페이지의 특정 영역을 가져와서 클라이언트에 보여주고 등등
webdriverJS GIT 홈페이지에 들어가셔서 지원하는 기능을 확인하시면 정말 활용할 수 있는 방법이 무궁 무진합니다.

해당 서버 소스는 네이버 자동 띄어쓰기 기능 자체를 서버로 해서 사용자 pc에서 입력한 한글을 webdriverJS 서버
에서 자동으로 브라우저가 실행되어 띄어쓰기된 결과값을 클라이언트에 리턴해주는 소스입니다.

-------------------------------------------------------------------------------------------------------
var client = require("webdriverjs").remote({desiredCapabilities:{browserName:"chrome",handlesAlerts:true}});
var now = require("now");
var express = require('express');

var app = express.createServer();
app.listen(7878);

var everyone = now.initialize(app);
client.init() ;
client.url("http://s.lab.naver.com/autospacing/");

var prContent = "";

everyone.now.callList = function(reqTxt){
client.url("http://s.lab.naver.com/autospacing/?query="+reqTxt);
client.submitForm("#search_form");
client.execute("return document.getElementsByClassName('wrap_spacing2')[0].innerHTML",function(result){everyone.now.returnPostHTML(result.value);
});
}
-------------------------------------------------------------------------------------------------------

서버상에서 브라우저를 맘대로 컨트롤 하고 그 결과값이나 동작 입맛에 맛게 가져오는 것.. 엄청난 강점일 거 같습니다.

node.js 자체도 나름 강력한 부분이 있지만 더 큰 강점은 npm에 있나봅니다. 집단 지성의 강점
한 번 활용해 보시면 재밌습니다.

참고 URL은 https://github.com/Camme/webdriverjs 입니다.
2012/07/20 20:38 2012/07/20 20:38

<script>
function SearchCheckForm(f){
if( f.keyword.value == ""){
alert("검색창에 아티스트나 곡명을 입력해주세요.");
f.keyword.focus();
return false;
}
}
</script>
<form action="/ezmart.php" name="SearchCheck" method = "get" onsubmit='return SearchCheckForm(this);' >
<input type = "hidden" name="tquery" value="martmain">
<table width="540" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="228"><img src="/01_img/main/search.gif" width="228" height="34" /></td>
<td background="/01_img/main/search-02.gif" width="261" height="34" class="txtLeft"><input name="keyword" type="text" style="margin:5px 8px 5px 8px; padding:1px; border:none; height:16px; width:238px;" value="<?=urldecode(stripslashes($keyword))?>" /></td>
<td align="right" valign="middle"><input type = "image" src="/01_img/main/search-03.gif" width="51" height="34" /></td>
</tr>
</table>
</form>

<?

/*
DB에서의 저장은
1) '
2) &#039;

2가지로 되어 있는 싱태 이다

ex)

Don\&#039;t Cry (원음 MR)
Don\&#039;t Say Goodbye (MR)
Don\'t Cry (로열패밀리 OST)

*/

// 홑따움표를 변환 시킨다.
if($keyword){
$tkeyword = strip_tags(trim(urldecode(stripslashes($keyword))));
$tkeyword = str_replace(' ' , '' , $tkeyword);
$tkeyword = preg_replace("/\'/", "", $tkeyword);
$tkeyword = preg_replace("/\&#039;/", "", $tkeyword);

$where .= " and ( " ;
$where .= " ( REPLACE(Name,' ','') LIKE '%$tkeyword%' OR REPLACE(Model,' ','') LIKE '%$tkeyword%' ) ";
$where .= " or ( REPLACE( Name, '\\\\&#039;', '' ) LIKE '%$tkeyword%' OR REPLACE( Model, '\\\\&#039;', '' ) LIKE '%$tkeyword%' ) ";
$where .= " or ( REPLACE( Name, '\\\\\\'', '' ) LIKE '%$tkeyword%' OR REPLACE( Model, '\\\\\\'', '' ) LIKE '%$tkeyword%' ) ";

$where .= " ) ";
}

?>

<?
$TransData = "tquery=$tquery&code=$code&keyword=" . urlencode(stripslashes($keyword));
include "${SKIN_FOLDER_NAME}/page/${PageSkin}/index.php" ;
?>

2012/02/07 10:07 2012/02/07 10:07
<%
'////////////////////////////////////////////////////////////////////
'//가. 명령어 삽입(Command Injection) 가능성
'////////////////////////////////////////////////////////////////////
Dim title, str
title = "What's Up!!! <what happen> Oh my god!!!! & goodness"
str = ""
//변환을 수행할 함수
Sub ReplaceStr(content, byref str)
content = replace(content, "'", """)
content = replace(content, "&", "&")
content = replace(content, "<", "<")
content = replace(content, ">", ">")

str = content
End Sub

ReplaceStr title, str
response.write str

%>

'////////////////////////////////////////////////////////////////////
'//나. 크로스 사이트 스크립팅 (XSS) 가능성
'////////////////////////////////////////////////////////////////////
/include/config.inc.asp
<%
atag = "p,br" 'XSS 허용할 태그 리스트
UploadedPath = "/Uploaded_Files/" '업로드 기본 경로
fileext = "jpg,gif,png,pcx" '허용할 확장자 리스트
%>


/include/secure.inc.asp
<%
'공격 위험성이 존재하는 문자들을 필터링
'문자열 입력값을 검증
'숫자형은 데이터 타입을 별도로 체크하도록 한다.
Function sqlFilter(search)
Dim strSearch(5), strReplace(5), cnt, data

'SQL Injection 특수문자 필터링
'필수 필터링 문자 리스트
strSearch(0)="'"
strSearch(1)=""""
strSearch(2)="\"
strSearch(3)=null
strSearch(4)="#"
strSearch(5)="--"
strSearch(6)=";"

'변환될 필터 문자
strReplace(0)="''"
strReplace(1)=""""""
strReplace(2)="\\"
strReplace(3)="\"&null
strReplace(4)="\#"
strReplace(5)="\--"
strReplace(6)="\;"

data = search
For cnt = 0 to 6 '필터링 인덱스를 배열 크기와 맞춰준다.
data = replace(data, LCASE(strSearch(cnt)), strReplace(cnt))
Next

sqlFilter = data
End Function

'XSS 출력 필터 함수
'XSS 필터 함수
'$str - 필터링할 출력값
'$avatag - 허용할 태그 리스트 예) $avatag = "p,br"
Function clearXSS(strString, avatag)
'XSS 필터링
strString = replace(strString, "<", "<")
strString = replace(strString, "\0", "")

'허용할 태그 변환
avatag = replace(avatag, " ", "") '공백 제거
If (avatag <> "") Then
taglist = split(avatag, ",")

for each p in taglist
strString = replace(strString, "<"&p&" ", "<"&p&" ", 1, -1, 1)
strString = replace(strString, "<"&p&">", "<"&p&">", 1, -1, 1)
strString = replace(strString, "</"&p&" ", "</"&p&" ", 1, -1, 1)
next
End If

clearXSS = strString
End Function

'확장자 검사
'$filename: 파일명
'$avaext: 허용할 확장자 예) $avaext = "jpg,gif,pdf"
'리턴값: true-"ok", false-"error"
Function Check_Ext(filename,avaext)
Dim bad_file, FileStartName, FileEndName

If instr(filename, "\0") Then
Response.Write "허용하지 않는 입력값"
Response.End
End If

'업로드 금지 확장자 체크
bad_file = "asp,html,htm,asa,hta"

filename = Replace(filename, " ", "")
filename = Replace(filename, "%", "")

FileStartName = Left(filename,InstrRev(filename,".")-1)
FileEndName = Mid(filename, InstrRev(filename, ".")+1)

bad_file = split(bad_file, ",")

for each p in bad_file
if instr(FileEndName, p)>0 then
Check_Ext = "error"
Exit Function
end if
next

'허용할 확장자 체크
if avaext <> "" Then
ok_file = split(avaext, ",")

for each p in ok_file
if instr(FileEndName, p)>0 then
Check_Ext = "ok"
Exit Function
End If
next
End If

Check_Ext = "error"
End Function

'다운로드 경로 체크 함수
'$dn_dir - 다운로드 디렉토리 경로(path)
'$fname - 다운로드 파일명
'리턴 - true:파운로드 파일 경로, false: "error"
Function Check_Path(dn_dir, fname)
'디렉토리 구분자를 하나로 통일
dn_dir = Replace(dn_dir, "/", "\")
fname = Replace(fname, "/", "\")

strFile = Server.MapPath(dn_dir) & "\" & fname '서버 절대경로

strFname = Mid(fname,InstrRev(fname,"\")+1) '파일 이름 추출, ..\ 등의 하위 경로 탐색은 제거 됨
Response.Write strFname

strFPath = Server.MapPath(dn_dir) & "\" & strFname '웹서버의 파일 다운로드 절대 경로

If strFPath = strFile Then
Check_Path = strFile '정상일 경우 파일 경로 리턴
Else
Check_Path = "error"
End If
End Function

'IP 체크 함수
Function Check_IP(IP_Addr)
If Request.Servervariables("REMOTE_ADDR") = IP_Addr Then
Check_IP = "TRUE"
Else
Check_IP = "FALSE"
End If
End Function
%>



/head.asp
<%
'페이지에서 에러가 발생하여도 페이지 오류를 외부로 출력하지 않기위해 사용
On Error Resume Next
'On Error GoTo 0도 가능하나 2003에서는 실행되지 않음
if err.number <> 0 then
'Response.Write err.description & "<BR>" & err.source & "<BR>"
err.clear
End if
%>


/content.asp
<!--#include virtual="/include/connection.inc.asp"--> <% 'DB연결 헤더 %>
<!--#include virtual="/include/secure.inc.asp"--> <% '보안관련라이브러리 %>
<!--#include virtual="/include/config.inc.asp"--> <% '전역변수리스트 %>
<!--#include virtual="/head.asp"--> <% '초기 설정 페이지(에러 메세지 미출력) %>
<%
Dim strSQL
Dim intSeq, strName, strEmail, strSubject, strContent, intCount, dtmReg_Date, intExist
Dim blnTag, strUserIP
Dim atag

'입력값이 숫자형인 경우 IsNumeric 함수를 사용한다.
If IsNumeric(seq) Then
intSeq = Request.QueryString("seq")
Else
Response.Write "허용하지 않는 입력값입니다."
Reponse.End
End If

'문자(열)인 경우 sqlfilter 사용
'intSeq = sqlFilter(Request.QueryString("seq")) 'SQL Injection 필터링

'읽은 횟수 검색
strSQL = "SELECT count(*) FROM board WHERE intSeq='" & intSeq & "'"

objRs.Open strSQL, objDBConn

intExist = objRs(0)
objRs.Close

If intExist <> 1 Then
Response.Write "해당글이 없습니다."
Else
'읽은 횟수 증가
strSQL = "UPDATE board SET intCount=intCount+1 WHERE intSeq='" & intSeq & "'"
objRs.Open strSQL, objDBConn

'게시물 SELECTZ
strSQL = "SELECT strName,strEmail,strSubject,strContent,intCount,strUserIP,blnTag,dtmReg_Date FROM board WHERE intSeq='" & intSeq & "'"
objRs.Open strSQL, objDBConn

strName = objRs(0)
strEmail = objRs(1)
strSubject = objRs(2)
strContent = objRs(3)
intCount = objRs(4)
strUserIP = objRs(5)
blnTag = objRs(6)
dtmReg_Date = objRs(7)

objRs.Close
Set objRs = Nothing

objDBConn.Close
Set objDBConn = Nothing

'게시물 출력값에 XSS 필터링
'사용자가 입력하는 출력되는 값은 strName, strEmail, strSubject, strContent으로 이 부분은 XSS 공격이 가능한 부분들이다.
'일반적으로 본문만 선택적으로 HTML 태그 사용을 허용하며 나머지 부분들은 사용할 수 없도록 하는것이 바람직하다.
strName = clearXSS(strName, atag)
strEmail = clearXSS(strEmail, atag)
strSubject = clearXSS(strSubject, atag)
strContent = clearXSS(strContent, atag)

'줄넘김 처리
strContent = replace(strContent, vbLf, vbLf & "<br>")
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ks_c_5601-1987">
<title>내용보기</title>
</head>

<body>
<div align=center>
<table border=1>
<tr>
<td>이름</td>
<td><%=strName%></td>
<td>등록일</td>
<td><%=dtmReg_Date%></td>
</tr>
<tr>
<td>이메일</td>
<td><%=strEmail%></td>
<td>조회</td>
<td><%=intCount%></td>
</tr>
<tr>
<td>제목</td>
<td colspan=3><%=strSubject%></td>
</tr>
<tr>
<td>내용</td>
<td colspan=3><%=strContent%></td>
</tr>
<tr>
<td colspan=4>
<a href="list.asp">목록으로</a> <a href="edit.asp?seq=<%=intSeq%>">수정하기</a> <a href="delete.asp?seq=<%=intSeq%>">삭제하기</a>
</td>
</tr>
</table>

</div>
</body>
</html>
<%
End If
%>



'////////////////////////////////////////////////////////////////////
'//다. SQL 구문 삽입 가능성
'////////////////////////////////////////////////////////////////////
SQL Injection은 쿼리문의 잘못 해석함에서 발생하는 문제이다. 이를 해결하기 위해서는 쿼리문을 생성시에 입력된 값에 대한 유효성 검사를 수행하면 된다. ‘, “ 문자를 \’, \”로 변경해 주거나 아예 공백으로 처리하는 방법이다.

삭제해야 할 프로시저
xp_cmdshell
xp_stratmail
xp_sendmail
xp_grantlogin
xp_makewebtask


'////////////////////////////////////////////////////////////////////
'//사. 다운로드 취약성
'////////////////////////////////////////////////////////////////////
<!--#include virtual="/include/connection.inc.asp"--> <% 'DB연결 헤더 %>
<!--#include virtual="/include/secure.inc.asp"--> <% '보안관련라이브러리 %>
<!--#include virtual="/include/config.inc.asp"--> <% '전역변수리스트 %>
<!--#include virtual="/head.asp"--> <% '초기 설정 페이지(에러 메세지 미출력) %>
<%
Dim dn_dir, fname, val_ok
Dim UploadedPath

dn_dir = Request("dir")
fname = Request("fname") '파일 이름

' IE 5.01에서는 이 방식을 사용할때 메모리 관련 문제가 발생할 수 있다.
strUA = Request.ServerVariables("HTTP_USER_AGENT")
If Instr(strUA, "MSIE") Then
intVersion = CDbl(mid(strUA, Instr(strUA, "MSIE")+5, 3))

If intVersion < 5.01 Then
Response.Write "error"
End If
End If

if fname = "" Then
Response.Write "<script language=javascript>"
Response.Write "alert(""파일명을 입력해 주세요"");"
Response.Write "history.back();"
Response.Write "</script>"
End If

dn_dir = UploadedPath & dn_dir
val_ok = Check_Path(dn_dir, fname)

If val_ok <> "error" Then '사용자가 다운 받는 파일과 웹서버의 파일 다운로드 경로가 맞는지 비교
Set objStream = Server.CreateObject("ADODB.Stream") 'Stream 이용

Response.ContentType = "application/unknown" 'ContentType 선언
Response.AddHeader "Content-Disposition","attachment; filename=" & fname

objStream.Open
objStream.Type = 1
objStream.LoadFromFile val_ok

download = objStream.Read
Response.BinaryWrite download
End If

Set objstream = nothing '객체 초기화
%>
2012/01/02 02:04 2012/01/02 02:04
<SCRIPT language=javascript>
var banner_count = 1;
var cur_banner = 1;
var timeout_id;

function all_banner_clear() {
var banner_id = "";
for( var i=1; i<= banner_count; i++) {
banner_id = 'all_banner_'+ i;
document.all[banner_id].style.visibility='hidden';
}
clearTimeout(timeout_id);
}

function all_banner_change() {
var next_banner = cur_banner+1;
var banner_id = "";
if( next_banner > banner_count ) {
next_banner = 1;
}
banner_id = 'all_banner_'+ cur_banner;
document.all[banner_id].style.visibility='hidden';
banner_id = 'all_banner_'+ next_banner;
document.all[banner_id].style.visibility='visible';

cur_banner = next_banner;
timeout_id = window.setTimeout("all_banner_change()",4000);
}

function all_banner_open() {
if (screen.width==800) {
var w_left = 0;
} else {
var w_left = (screen.width)?(screen.width-600)/2:100;
}
var banner_id = "";
for(var i = 1; i<= banner_count; i++ ) {
banner_id = 'all_banner_' + i;
document.all[banner_id].style.left=w_left;
}
if (getCookie("all_banner_img") == null) {
document.all['all_banner_1'].style.visibility='visible';
selectbox_hidden(all_banner_1);
//timeout_id = window.setTimeout("all_banner_change()",4000);
} else {
document.all['all_banner_1'].style.visibility='hidden';
selectbox_visible();
}
}

function all_banner_cookie() {
if (document.all.cookie_check.checked == true) {
setCookie("all_banner_img", "true", 1);
}
document.all['all_banner_1'].style.visibility = "hidden";
clearTimeout(timeout_id);
}

function getCookie(Name) {
var search = Name + "="
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
End = document.cookie.indexOf(";", offset)
if (End == -1)
End = document.cookie.length
return unescape(document.cookie.substring(offset, End))
}
}
}

function setCookie(name, value, expiredays) {
var todayDate = new Date();
todayDate.setDate( todayDate.getDate() + expiredays );
document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function selectbox_hidden(layer_id) {
var ly = eval(layer_id);

// 레이어 좌표
var ly_left = ly.offsetLeft;
var ly_top = ly.offsetTop;
var ly_right = ly.offsetLeft + ly.offsetWidth;
var ly_bottom = ly.offsetTop + ly.offsetHeight;

// 셀렉트박스의 좌표
var el;

for (i=0; i<document.forms.length; i++) {
for (k=0; k<document.forms[i].length; k++) {
el = document.forms[i].elements[k];
if (el.type == "select-one") {
var el_left = el_top = 0;
var obj = el;
if (obj.offsetParent) {
while (obj.offsetParent) {
el_left += obj.offsetLeft;
el_top += obj.offsetTop;
obj = obj.offsetParent;
}
}
el_left += el.clientLeft;
el_top += el.clientTop;
el_right = el_left + el.clientWidth;
el_bottom = el_top + el.clientHeight;

// 좌표를 따져 레이어가 셀렉트 박스를 침범했으면 셀렉트 박스를 hidden 시킴
if ((ly_right >= el_left && ly_left <= el_right) && (ly_bottom >= el_top && ly_top <= el_bottom))
el.style.visibility = 'hidden';
}
}
}
}

// 감추어진 셀렉트 박스를 모두 보이게 함
function selectbox_visible() {
for (i=0; i<document.forms.length; i++) {
for (k=0; k<document.forms[i].length; k++) {
el = document.forms[i].elements[k];
if (el.type == "select-one" && el.style.visibility == 'hidden')
el.style.visibility = 'visible';
}
}
}
</SCRIPT>


<DIV id=all_banner_1 style="Z-INDEX: 8; LEFT: 400px; VISIBILITY: hidden; POSITION: absolute; TOP: 278px">
<IFRAME style="Z-INDEX: -1; ; LEFT: expression(this.nextSibling.offsetLeft); ;
WIDTH: expression(this.nextSibling.offsetWidth); POSITION: absolute; ;
TOP: expression(this.nextSibling.offsetTop); ; HEIGHT: expression(this.nextSibling.offsetHeight)"
src="about:blank" frameBorder=0></IFRAME>

<TABLE cellSpacing=0 cellPadding=0 width=400 bgColor=#ffffff border=0>
<TR>
<TD align=middle height=10></TD>
</TR>
<TR>
<TD height=5></TD>
</TR>
<TR>
<TD style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px" height=15>
<TABLE cellSpacing=1 cellPadding=0 width="100%" bgColor=#d0d0d0 border=0>
<TR>
<TD>
<TABLE cellSpacing=5 cellPadding=0 width="100%" bgColor=#e7e7e7 border=0>
<TR>
<TD bgColor=#ffffff>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TR>
<TD height=10></TD>
</TR>
<TR>
<TD align=middle height=10>
<TABLE cellSpacing=0 cellPadding=0 width="95%" border=0>
<TR>
<TD width=10>>></TD>
<TD style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bold; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; PADDING-TOP: 2px; LETTER-SPACING: -0.1em">알려드립니다.!!!</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px; PADDING-BOTTOM: 0px; PADDING-TOP: 15px" height=10>
공지사항입니다.공지사항입니다.공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.<br />
공지사항입니다.
</TD>
</TR>
<TR>
<TD height=5></TD>
</TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TR>
<TD width="3%" bgColor=#f7f7f7 height=30></TD>
<TD width="6%" bgColor=#f7f7f7><INPUT type=checkbox name=cookie_check></TD>
<TD width="36%" bgColor=#f7f7f7>오늘 하루 그만 보기 </TD>
<TD style="PADDING-RIGHT: 5px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px" align=right width="55%" bgColor=#f7f7f7>
<A onfocus=this.blur(); href="javascript:all_banner_cookie();">:: 닫기 ::</A>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD align=middle height=10></TD>
</TR>
</TABLE>
</DIV>
<SCRIPT>
all_banner_open();
</SCRIPT>
2011/12/06 11:42 2011/12/06 11:42
안드로이드 Intent에서 앱을 호출하는 방법을 정리 합니다.

연락처 Intent

  • 연락처 조회
intent = new Intent(Intent.ACTION_VIEW, 
Uri.parse("content://contacts/people/" +
String.valueOf(contact.getId())));
startActivity(intent);
  • 연락처 등록
intent = new Intent(Intent.ACTION_INSERT, 
Uri.parse("content://contacts/people"));
startActivity(intent);
  • 연락처 수정
intent = new Intent(Intent.ACTION_EDIT, 
Uri.parse("content://contacts/people/" +
String.valueOf(contact.getId())));
startActivity(intent);
  • 연락처 삭제
intent = new Intent(Intent.ACTION_DELETE, 
Uri.parse("content://contacts/people/" +
String.valueOf(contact.getId())));
startActivity(intent);

전화 Intent

  • 권한 설정 (AndroidManifest.xml)
전화 걸기         : CALL_PHONE = "android.permission.CALL_PHONE"
긴급 통화 : CALL_PRIVILEGED =
"android.permission.CALL_PRIVILEGED"
폰 상태 읽기 : READ_PHONE_STATE =
"android.permission.READ_PHONE_STATE"
폰 상태 수정 : MODIFY_PHONE_STATE =
"android.permission.MODIFY_PHONE_STATE"
브로드케스팅 수신 : PROCESS_OUTGOING_CALLS =
"android.permission.PROCESS_OUTGOING_CALLS"
전화 걸기 이전 : ACTION_NEW_OUTGOING_CALL =
"android.intent.action.NEW_OUTGOING_CALL"
  • 전화걸기 화면
Intent intent = new Intent(Intent.ACTION_DIAL, 
Uri.parse("tel:" + TelNumber));
startActivity(intent);
  • 전화걸기
Intent intent = new Intent(Intent.ACTION_CALL, 
Uri.parse("tel:" + TelNumber));
startActivity(intent);

SMS Intent

  • 권한 설정 (AndroidManifest.xml)
수신 모니터링       : RECEIVE_SMS = "android.permission.RECEIVE_SMS"
읽기 가능 : READ_SMS = "android.permission.READ_SMS"
발송 가능 : SEND_SMS = "android.permission.SEND_SMS"
SMS Provider로 전송 : WRITE_SMS = "android.permission.WRITE_SMS"
: BROADCAST_SMS = "android.permission.BROADCAST_SMS"
  • SMS 발송 화면
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.putExtra("sms_body", "The SMS text");
intent.setType("vnd.android-dir/mms-sms");
startActivity(intent);
  • SMS 보내기
Intent intent = new Intent(Intent.ACTION_SENDTO, 
Uri.parse("smsto://" + contact.getHandphone()));
intent.putExtra("sms_body", "The SMS text");
intent.setType("vnd.android-dir/mms-sms");
startActivity(intent);

이메일 Intent

  • 이메일 발송 화면
Intent intent = new Intent(Intent.ACTION_SENDTO, 
Uri.parse("mailto:" + contact.getEmail()));
startActivity(intent);

브라우저 Intent

  • Browser에서 URL 호출하기
new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com/"));
startActivity(intent);
  • 브라우저에서 검색
Intent intent = new Intent(Intent.ACT ION_WEB_SEARCH);
intent.putExtra(SearchManager.QUERY, "검색어");
startActivity(intent);

지도 Intent

  • 지도 보기
Uri uri = Uri.parse ("geo: 38.00, -35.03");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

안드로이드 마켓 Intent

  • 안드로이드 마켓에서 Apps 검색
Uri uri = Uri.parse("market://search?q=pname:전제_패키지_명");  
//--- 예) market://search?q=pname:com.jopenbusiness.android.smartsearch
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
  • 안드로이드 마켓의 App 상세 화면
Uri uri = Uri.parse("market://details?id=전제_패키지_명");
//--- 예) market://details?id=com.jopenbusiness.android.smartsearch
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

갤럭시S의 Intent

  • 패키지명과 클래스명으로 App 호출
intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("패키지명", "전체_클래스명"));
startActivity(intent);
  • 전화, SMS
  • 전화번호부 : com.android.contacts, com.sec.android.app.contacts.PhoneBookTopMenuActivity
  • 전화 : com.sec.android.app.dialertab, com.sec.android.app.dialertab.DialerTabActivity
  • 최근기록 : com.sec.android.app.dialertab, com.sec.android.app.dialertab.DialerTabDialerActivity
  • 메시지 : com.sec.mms, com.sec.mms.Mms
  • 이메일 : com.android.email, com.android.email.activity.Welcome
  • 일정 : com.android.calendar, com.android.calendar.LaunchActivity
  • 인터넷 : com.android.browser, com.android.browser.BrowserActivity
  • Google의 Android용 앱
  • 검색 : com.google.android.googlequicksearchbox, com.google.android.googlequicksearchbox.SearchActivity
  • 음성 검색 : com.google.android.voicesearch, com.google.android.voicesearch.RecognitionActivity
  • Gmail : com.google.android.gm, com.google.android.gm.ConversationListActivityGmail
  • 지도 : com.google.android.apps.maps, com.google.android.maps.MapsActivity
  • 위치찾기 : com.google.android.apps.maps, com.google.android.maps.LatitudeActivity
  • YouTube : com.google.android.youtube, com.google.android.youtube.HomeActivity
  • 토크 : com.google.android.talk, com.google.android.talk.SigningInActivity
  • Goggles : com.google.android.apps.unveil, com.google.android.apps.unveil.CaptureActivity
  • Google 번역 : com.google.android.apps.translate, com.google.android.apps.translate.HomeActivity
  • Reader : com.google.android.apps.reader, com.google.android.apps.unveil.CaptureActivity
  • Voice : com.google.android.apps.googlevoice, com.google.android.apps.googlevoice.SplashActivity
  • Google 별지도 : com.google.android.stardroid, com.google.android.stardroid.activities.SplashScreenActivity
  • 카메라 : com.sec.android.app.camera, com.sec.android.app.camera.Camera
  • TV : com.sec.android.app.dmb, com.sec.android.app.dmb.activity.DMBFullScreenView
  • Android 관리
  • 환경 설정 : com.android.settings, com.android.settings.Settings
  • 작업 관리자 : com.sec.android.app.controlpanel, com.sec.android.app.controlpanel.activity.JobManagerActivity
  • 마켓 : com.android.vending, com.android.vending.AssetBrowserActivity
2011/12/06 11:32 2011/12/06 11:32
// 웹페이지 띄우기
Uri uri = Uri.parse("http://www.google.com");
Intent it = new Intent(Intent.ACTION_VIEW,uri);
startActivity
(it);

// 구글맵 띄우기
Uri uri = Uri.parse("geo:38.899533,-77.036476");
Intent it = new Intent(Intent.Action_VIEW,uri);
startActivity
(it);


// 구글 길찾기 띄우기
Uri uri = Uri.parse("http://maps.google.com/maps?f=d&saddr=출발지주소&daddr=도착지주소&hl=ko");
Intent it = new Intent(Intent.ACTION_VIEW,URI);
startActivity
(it);


// 전화 걸기
Uri uri = Uri.parse("tel:xxxxxx");
Intent it = new Intent(Intent.ACTION_DIAL, uri);
startActivity
(it);


Uri uri = Uri.parse("tel.xxxxxx");
Intent it = new Intent(Intent.ACTION_CALL,uri);
// 퍼미션을 잊지 마세요. <uses-permission id="android.permission.CALL_PHONE" />


// SMS/MMS 발송
Intent it = new Intent(Intent.ACTION_VIEW);
it
.putExtra("sms_body", "The SMS text");
it
.setType("vnd.android-dir/mms-sms");
startActivity
(it);


// SMS 발송
Uri uri = Uri.parse("smsto:0800000123");
Intent it = new Intent(Intent.ACTION_SENDTO, uri);
it
.putExtra("sms_body", "The SMS text");
startActivity
(it);


// MMS 발송
Uri uri = Uri.parse("content://media/external/images/media/23");
Intent it = new Intent(Intent.ACTION_SEND);
it
.putExtra("sms_body", "some text");
it
.putExtra(Intent.EXTRA_STREAM, uri);
it
.setType("image/png");
startActivity
(it);


// 이메일 발송
Uri uri = Uri.parse("mailto:xxx@abc.com");
Intent it = new Intent(Intent.ACTION_SENDTO, uri);
startActivity
(it);


Intent it = new Intent(Intent.ACTION_SEND);
it
.putExtra(Intent.EXTRA_EMAIL, "me@abc.com");
it
.putExtra(Intent.EXTRA_TEXT, "The email body text");
it
.setType("text/plain");
startActivity
(Intent.createChooser(it, "Choose Email Client"));


Intent it = new Intent(Intent.ACTION_SEND);
String[] tos = {"me@abc.com"};
String[] ccs = {"you@abc.com"};
it
.putExtra(Intent.EXTRA_EMAIL, tos);
it
.putExtra(Intent.EXTRA_CC, ccs);
it
.putExtra(Intent.EXTRA_TEXT, "The email body text");
it
.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");
it
.setType("message/rfc822");
startActivity
(Intent.createChooser(it, "Choose Email Client"));


// extra 추가하기
Intent it = new Intent(Intent.ACTION_SEND);
it
.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");
it
.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/mysong.mp3");
sendIntent
.setType("audio/mp3");
startActivity
(Intent.createChooser(it, "Choose Email Client"));


// 미디어파일 플레이 하기
Intent it = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("file:///sdcard/song.mp3");
it
.setDataAndType(uri, "audio/mp3");
startActivity
(it);


Uri uri = Uri.withAppendedPath(
MediaStore.Audio.Media.INTERNAL_CONTENT_URI, "1");
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity
(it);


// 설치 어플 제거
Uri uri = Uri.fromParts("package", strPackageName, null);
Intent it = new Intent(Intent.ACTION_DELETE, uri);
startActivity
(it);


// APK파일을 통해 제거하기
Uri uninstallUri = Uri.fromParts("package", "xxx", null);
returnIt
= new Intent(Intent.ACTION_DELETE, uninstallUri);


// APK파일 설치
Uri installUri = Uri.fromParts("package", "xxx", null);
returnIt
= new Intent(Intent.ACTION_PACKAGE_ADDED, installUri);


// 음악 파일 재생
Uri playUri = Uri.parse("file:///sdcard/download/everything.mp3");
returnIt
= new Intent(Intent.ACTION_VIEW, playUri);


// 첨부파일을 추가하여 메일 보내기
Intent it = new Intent(Intent.ACTION_SEND);
it
.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");
it
.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/eoe.mp3");
sendIntent
.setType("audio/mp3");
startActivity
(Intent.createChooser(it, "Choose Email Client"));


// 마켓에서 어플리케이션 검색
Uri uri = Uri.parse("market://search?q=pname:pkg_name");
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity
(it);
// 패키지명은 어플리케이션의 전체 패키지명을 입력해야 합니다.


// 마켓 어플리케이션 상세 화면
Uri uri = Uri.parse("market://details?id=어플리케이션아이디");
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity
(it);
// 아이디의 경우 마켓 퍼블리싱사이트의 어플을 선택후에 URL을 확인해보면 알 수 있습니다.


// 구글 검색
Intent intent = new Intent();
intent
.setAction(Intent.ACTION_WEB_SEARCH);
intent
.putExtra(SearchManager.QUERY,"searchString")
startActivity
(intent);

2011/12/06 11:31 2011/12/06 11:31
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
// 웹페이지 띄우기
Uri uri = Uri.parse("http://www.google.com");
Intent it  = new Intent(Intent.ACTION_VIEW,uri);
startActivity(it);
// 구글맵 띄우기
Uri uri = Uri.parse("geo:38.899533,-77.036476");
Intent it = new Intent(Intent.Action_VIEW,uri);
startActivity(it);
// 구글 길찾기 띄우기
Uri uri = Uri.parse("http://maps.google.com/maps?f=d&saddr=출발지주소&daddr=도착지주소&hl=ko");
Intent it = new Intent(Intent.ACTION_VIEW,URI);
startActivity(it);
// 전화 걸기
Uri uri = Uri.parse("tel:xxxxxx");
Intent it = new Intent(Intent.ACTION_DIAL, uri); 
startActivity(it); 
Uri uri = Uri.parse("tel.xxxxxx");
Intent it = new Intent(Intent.ACTION_CALL,uri);
// 퍼미션을 잊지 마세요. <uses-permission id="android.permission.CALL_PHONE" />
// SMS/MMS 발송
Intent it = new Intent(Intent.ACTION_VIEW);  
it.putExtra("sms_body", "The SMS text");  
it.setType("vnd.android-dir/mms-sms");  
startActivity(it); 
// SMS 발송
Uri uri = Uri.parse("smsto:0800000123");  
Intent it = new Intent(Intent.ACTION_SENDTO, uri);  
it.putExtra("sms_body", "The SMS text");  
startActivity(it); 
// MMS 발송
Uri uri = Uri.parse("content://media/external/images/media/23");  
Intent it = new Intent(Intent.ACTION_SEND);  
it.putExtra("sms_body", "some text");  
it.putExtra(Intent.EXTRA_STREAM, uri);  
it.setType("image/png");  
startActivity(it);
// 이메일 발송
Uri uri = Uri.parse("mailto:xxx@abc.com");
Intent it = new Intent(Intent.ACTION_SENDTO, uri);
startActivity(it);
Intent it = new Intent(Intent.ACTION_SEND);  
it.putExtra(Intent.EXTRA_EMAIL, "me@abc.com");  
it.putExtra(Intent.EXTRA_TEXT, "The email body text");  
it.setType("text/plain");  
startActivity(Intent.createChooser(it, "Choose Email Client")); 
Intent it = new Intent(Intent.ACTION_SEND);    
String[] tos = {"me@abc.com"};    
String[] ccs = {"you@abc.com"};    
it.putExtra(Intent.EXTRA_EMAIL, tos);    
it.putExtra(Intent.EXTRA_CC, ccs);    
it.putExtra(Intent.EXTRA_TEXT, "The email body text");    
it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");    
it.setType("message/rfc822");    
startActivity(Intent.createChooser(it, "Choose Email Client"));  
// extra 추가하기
Intent it = new Intent(Intent.ACTION_SEND);  
it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text");  
it.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/mysong.mp3");  
sendIntent.setType("audio/mp3");  
startActivity(Intent.createChooser(it, "Choose Email Client"));
// 미디어파일 플레이 하기
Intent it = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("file:///sdcard/song.mp3");
it.setDataAndType(uri, "audio/mp3");
startActivity(it);
Uri uri = Uri.withAppendedPath(
  MediaStore.Audio.Media.INTERNAL_CONTENT_URI, "1");  
Intent it = new Intent(Intent.ACTION_VIEW, uri);  
startActivity(it); 
// 설치 어플 제거
Uri uri = Uri.fromParts("package", strPackageName, null);  
Intent it = new Intent(Intent.ACTION_DELETE, uri);  
startActivity(it);
// APK파일을 통해 제거하기
Uri uninstallUri = Uri.fromParts("package", "xxx", null);
returnIt = new Intent(Intent.ACTION_DELETE, uninstallUri);
// APK파일 설치
Uri installUri = Uri.fromParts("package", "xxx", null);
returnIt = new Intent(Intent.ACTION_PACKAGE_ADDED, installUri);
// 음악 파일 재생
Uri playUri = Uri.parse("file:///sdcard/download/everything.mp3");
returnIt = new Intent(Intent.ACTION_VIEW, playUri);
// 첨부파일을 추가하여 메일 보내기
Intent it = new Intent(Intent.ACTION_SEND); 
it.putExtra(Intent.EXTRA_SUBJECT, "The email subject text"); 
it.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/eoe.mp3"); 
sendIntent.setType("audio/mp3"); 
startActivity(Intent.createChooser(it, "Choose Email Client"));
// 마켓에서 어플리케이션 검색
Uri uri = Uri.parse("market://search?q=pname:pkg_name"); 
Intent it = new Intent(Intent.ACTION_VIEW, uri); 
startActivity(it); 
// 패키지명은 어플리케이션의 전체 패키지명을 입력해야 합니다.
// 마켓 어플리케이션 상세 화면
Uri uri = Uri.parse("market://details?id=어플리케이션아이디"); 
Intent it = new Intent(Intent.ACTION_VIEW, uri); 
startActivity(it);
// 아이디의 경우 마켓 퍼블리싱사이트의 어플을 선택후에 URL을 확인해보면 알 수 있습니다.
// 구글 검색
Intent intent = new Intent();
intent.setAction(Intent.ACTION_WEB_SEARCH);
intent.putExtra(SearchManager.QUERY,"searchString")
startActivity(intent);

[출처] Intent 활용 예제|작성자 다빈

2011/12/06 11:25 2011/12/06 11:25

* 안드로이드을빨리이해하기위한방법

1. OpenSource활용

- http://code.google.com/hosting/

- http://google.com/codesearch

2. Reverse Engineering 활용하여 학습하기

- 자바 클래스 리버싱

사용자 삽입 이미지

- 안드로이드 실행파일 구조와 리버싱

사용자 삽입 이미지

사용자 삽입 이미지

* APK파일 디컴파일(Decompile)하는 방법

1. 디컴파일을 위한 툴 설치

1.ApkTool

- 다운로드 : http://code.google.com/p/android-apktool/downloads/list

사용자 삽입 이미지

- 압축풀기 : android-sdk가 설치된 platform-tools디렉토리안에 apktool디렉토리를 만들어 압축을 푼다.

apktool1.4.1.tar.bz2

apktool-install-windows-r04-brut1.tar.bz2

사용자 삽입 이미지

2.Dex2Jar

- 다운로드 : http://code.google.com/p/dex2jar/downloads/list

사용자 삽입 이미지


- 압축풀기 : android-sdk가 설치된 platform-tools디렉토리안에 dex2jar디렉토리를 만들어 압축을 푼다.

dex2jar-0.0.7.10-SNAPSHOT.zip

사용자 삽입 이미지

3.Java Decompiler

- 다운로드 : http://java.decompiler.free.fr/?q=jdgui

사용자 삽입 이미지

- 압축풀기 : 실행하기 편한 곳에 압축을 풀어 놓는다.

2. 환경변수 잡기

- adb, apktool, dex2jar 명령어를 사용하기 위한 환경변수를 잡는다.

%ANDROID_SDK%\platform-tools

%ANDROID_SDK%\platform-tools\apktool

%ANDROID_SDK%\platform-tools\dex2jar

 

사용자 삽입 이미지사용자 삽입 이미지

3. apk 파일 추출

- 폰에 설치된 모든 패키리를 리스트로 보인다.

사용자 삽입 이미지

- 리스트 중에 디컴파일 할 APK파일을 정한다.

사용자 삽입 이미지

- APK파일을 추출한다. (adb shell을 종료 후 수행한다.)

사용자 삽입 이미지

4. ApkTool 실행 (java파일 외 xml, image, db등을 추출할 수 있다.)

- apktool 명령어를 사용하여 apk파일에 있는 파일을 디코딩하여 out폴더에 내보낸다.

사용자 삽입 이미지

사용자 삽입 이미지

- xml파일을 열어 내용을 확인한다.

사용자 삽입 이미지

5. Dex2Jar 실행 (Java파일을 추출할 수 있다.)

- apk파일의 확장자를 zip으로 변경한다.

사용자 삽입 이미지

- 추출한 zip파일의 압축을 풀어 classes.dex 파일을 추출한다.

사용자 삽입 이미지

- Dex2Jar를 실행한다.

사용자 삽입 이미지

- Dex2Jar를 실행하면 아래 jar파일이 생긴다.

사용자 삽입 이미지

6. JD-GDI 실행

- JD-GDI실행하여 classes.dex.dex2jar파일을 열어 소스를 분석한다.

사용자 삽입 이미지

7. Enterprise Architect를 이용하여 클래스 다이어그램으로 분석한다.

- 다운로드 : http://www.sparxsystems.com.au/products/ea/trial.html

사용자 삽입 이미지

- 설치

사용자 삽입 이미지

- 실행

사용자 삽입 이미지

- Java Decompiler에서 open할 파일을 추출한다.

사용자 삽입 이미지

- zip파일을 압축을 푼다.

사용자 삽입 이미지

- Enterprise Architect에서 classes.dex.dex2jar.src디렉토리를 import 한다.

사용자 삽입 이미지

- 클래스 다이어그램을 보고 분석한다.

사용자 삽입 이미지

-----------------------------------------------------------------------------------------------------------------------

제 11회 한국자바개발자 컨퍼런스에서 트랙1, 3번째 세션에서 Reverse Engineering, 안드로이드 학습이란 주제로 발표를 진행합니다.

리버싱이 무엇인지, 안드로이드 리버싱을 통해서 어떻게 학습을 할 수 있는지 다양한 도구와 팁들을 소개합니다.

학습을 목적으로 리버스엔지니어링이 허용되지만 기술을 복제 유혹을 받을 수도 있습니다.

법적이나, 윤리적으로 문제가 된다는 것을 명심하고, 공부한 내용을 서로 공유하며 미소 지을 수 있는 개발문화가 되길 바래봅니다. :D

발표자료와 함께 사용된 동영상 공유합니다.

발표자료 : Reverse Engineering, 안드로이드 학습

자바 클래스 리버싱

안드로이드 실행파일 구조와 리버싱

Reverse Engineering 활용한 학습 예제

  1. 분석할 앱선정과 APK 파일 추출
  2. 디컴파일 후 분석
  3. 클래스 다이어그램으로 - Enterprise Architect
  4. 의존성 검사를 통해 쉽게 - xDepend
2011/12/06 11:18 2011/12/06 11:18
###########################################################################
### 쓴건 : 원격서버의 Virtualbox 웹관리를 위한 Phpvirtualbox 설치
### 쓴이 : 권성재 (nonots@hanmail.net, http://www.badaweb.co.kr)
### 쓴때 : 2011-12-13
###########################################################################

### 환경
- CentOS 5.x 64비트
- 아파치 2.2, PHP 5.2
- X 윈도우(GUI) 없이 텍스트모드(TUI)로 서버 실행중


1) 서버 CPU 가 가상화기술을 지원하는지 확인. 지원 안한다면 포기.
# egrep '(vmx|svm)' /proc/cpuinfo


2) php 확장기능에 soap, json 이 포함되어 있는지 확인. 없다면 추가 설치.
php 버전도 5.1 이상이어야 한다.
# php -i | egrep -i '(soap|json)'


3) dkms 패키지 설치
아래 링크에서 다운받아 설치
- http://rpmfind.net/linux/rpm2html/search.php?query=dkms
- http://linux.dell.com/dkms/permalink/
# rpm -Uvh dkms-~~~.rpm


4) VirtualBox 4.1 및 확장팩 설치
-http://download.virtualbox.org/virtualbox/
글쓰는 현재 최신버전이 4.1.6 이다. 확장팩도 같이 다운받는다
# rpm -Uvh VirtualBox-4.1-4.1.6_74727_rhel5-1.x86_64.rpm

-확장팩 설치
# VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.6-74713.vbox-extpack

부가기능 설치 위한 VBoxGuestAdditions_4.1.6.iso 파일도
다운받아 놓는다.

- vbox 사용자 추가하고 비밀번호 정한다. 비번을 kawkf123 이라고 하자
# useradd -g vboxusers vbox
# passwd vbox
만약 홈디렉토리를 /home/vbox 가 아니라 용량큰 다른 곳에 마운트한
/data/vbox 와 같은 위치를 사용한다면 -d /data/vbox 와 같이 추가

- /etc/vbox/vbox.cfg 파일 생성
[root@home3 ~]# cat /etc/vbox/vbox.cfg
VBOXWEB_USER=vbox
VBOXWEB_HOST=222.231.xxx.xxx
VBOXWEB_PORT=18083
VBOXWEB_LOGFILE=/var/log/vbox.log

와 같이 하고 반드시 /var/log/vbox.log 를 만들어줌
# touch /var/log/vbox.log
# chmod 600 /var/log/vbox.log
# chown vbox.vboxusers /var/log/vbox.log
이렇게 안만들어주고 데몬시작하니 말도 없이 까칠하게 생깜.
VBOXWEB_HOST=222.231.xxx.xxx 이 부분을
VBOXWEB_HOST=0.0.0.0 으로 하기도 한담.
18083 포트가 막혀있으면 열어준다.


5) Phpvirtualbox 4.1 설치
- http://code.google.com/p/phpvirtualbox/
위 링크에서 phpvirtualbox-4.1-5.zip 다운받아서 웹루트 적당한 곳에
압축을 푼다.
만약 Virtualbox 4.0 이 설치되었다면 phpvirtualbox 도 4.0 버전대를 사용
해야 할꺼다.
config.php-sample 파일을 config.php 로 복사한 후 편집기로 열어서 상단에

var $username = 'vbox';
var $password = 'kawkf123';
var $location = 'http://222.231.xxx.xxx:18083/';`

여기 username,password 는 4)에서 생성한 리눅스 서버 vbox 계정정보다.

이 웹접속 위치가 http://www.mysite.com/phpvirtualbox/index.php 라고 하자

어떤데서는 아래 명령어 줘야한다고함. vbox 계정으로 전환한 뒤 해야하거나.
# VBoxManage setproperty websrvauthlibrary null


6) 접속방법

# /etc/init.d/vboxballoonctrl-service start
# /etc/init.d/vboxdrv start
# /etc/init.d/vboxweb-service start
와 같이 데몬을 시작한다.
만약 위 3)에서 dkms 커널모듈이 설치가 불안정하게 되었다면
# /etc/init.d/vboxdrv setup 로 재설치할 수도 있다.
위 3 개 데몬 실행에 오류가 없고 18083 포트가 열렸고,프로세스가
# ps aux |grep vbox
vbox 32002 0.0 0.1 149588 4268 ? Sl 18:26 0:00 /usr/lib/virtualbox/vboxwebsrv --background -H 222.231.xxx.xxx -p 18083 -F /var/log/vbox.log
vbox 32007 0.0 0.0 119560 2200 ? S 18:26 0:00 /usr/lib/virtualbox/VBoxXPCOMIPCD
vbox 32012 0.0 0.1 140076 5620 ? Sl 18:26 0:00 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
와 같이 보이면 일단 된거다.

http://www.mysite.com/phpvirtualbox/index.php 와 같이 접속하면
로그인 아이디 비번 물을꺼다.
여기에 위에서 vbox 서버 계정 정보를 넣으려고 삽질하면 안.된.다. 나처럼 -_-;;
아이디 비번에 모두 admin 이라고 넣어야 한다.
로그인후 메뉴에서 admin 비밀번호를 바꾸면 된다.
보이는 화면은 그냥 virtualbox 와 비슷할꺼다.
..
이제 알아서 직관적으로 사용하면 된다.




### 참고
http://codefat.com/tag/phpvirtualbox/
http://www.oss.kr/12792
2011/12/06 09:39 2011/12/06 09:39

'===================================================================
'== 설명 : 문장을 해당 자릿수만큼 <br>이 들어간 문장으로 변환
'== 이름 : MakeBr(Str,Pos)
'== 변수 : Str(String),Pos(Int)
'== 반환 : String
'===================================================================
Function MakeBr(Str,Pos)

Dim StrLen, TmpStr, i, Midcnt, Start, Surplus

StrLen = len(Str)

If (StrLen Mod Pos) = 0 then
MidCnt = Fix(StrLen/Pos)
Else
MidCnt = Fix(StrLen/Pos) + 1
End If

for i = 1 to MidCnt
if i = 1 then
TmpStr = TmpStr&Mid(Str,i,pos)&"<br>"
Else
TmpStr = TmpStr&Mid(Str,((i-1)*Pos)+1,pos)&"<br>"
End If
next

MakeBr = TmpStr
End Function

' ##################################################################################
' 검색에서 selected
' ##################################################################################
Function getSelected(search,t)
if search = t then
getSelected ="selected"
end if
End function

' ##################################################################################
' checked
' ##################################################################################
Function getChecked(tag,y)
If tag = y then
getChecked = "checked"
End if
End function

' ##################################################################################
' 자동링크
' ##################################################################################

FUNCTION autolink(CONTENT)

DIm Re
Set re = New RegExp

' First Pass for http
re.Pattern = "(\w+):\/\/([^/:]+)(:\d*\b)?([^# \n<]*).*\n"
re.Pattern = "http://([0-9a-zA-Z./@:~?&=_-]+)"
re.Global = True
re.IgnoreCase = True

' ASP seems to be not supporting .MultiLine method.
're.MultiLine = True

CONTENT = re.Replace(CONTENT,"<a target=_blank href='http://$1'>http://$1</a>")

' Second Pass for mail
re.Pattern = "([_0-9a-zA-Z-]+(\.[_0-9a-zA-Z-]+)*)@([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)"
autolink = re.Replace(CONTENT,"<a href='mailto:$1@$3'>$1@$3</a>")

END FUNCTION

' ##################################################################################
' 문자열 체크 (리턴값:boolean)
' ##################################################################################
Function chkStrFlag(Val, chkStr)
Dim flag, MyPos

If Val = "" then
flag = false
Else
Mypos =Instr(Val,chkStr)
If MyPos = 0 then
flag=false
Else
flag=true
End If
End If

chkStrFlag = flag
End Function

'##################################################################################
' 문자열 체크 (공백이나 NULL값 체크)
' Val : 체크 값, r_Val (대체값)
'##################################################################################
Function replaceVal(val, r_Val)
Dim flag, MyPos

If (val = "") or IsNull(Val) then
replaceVal = r_Val
Else
replaceVal = val
End If
End Function

'##################################################################################
' 숫자값 자릿수만큼 문자로 변경 (공백이나 NULL값 체크)
' Val : 체크 값, chkLen 자릿수 , r_Val(대체값)
'##################################################################################
Function chkLenReplaceVal(val,chkLen, r_Val)
Dim chkCnt, MyPos
chkCnt = len(Cstr(val))

If chkCnt < chkLen then
chkLenReplaceVal = val

for i = 1 to (chkLen-chkCnt)
chkLenReplaceVal = r_Val&chkLenReplaceVal
next
Else
chkLenReplaceVal = val
End If

End Function

'##################################################################################
' 널값,""값 확인
' Val : 체크 값
' retun 값 : true, false
'##################################################################################
Function chkBlank(val)
If (val = "") or IsNull(Val) then
chkBlank = true
Else
chkBlank = false
End If
End Function

'##################################################################################
' 비교값 리턴
' Val : 체크 값
' retun 값 : true, false 또는 대치 문장
'##################################################################################
Function replaceStr(str, chkStr, replaceStr1, replaceStr2)
If str = chkStr then
replaceStr = replaceStr1
Else
replaceStr = replaceStr2
End If
End Function

'##################################################################################
' NULL값 만들기
' Val : 값
' retun 값 : NULL, 문장
'##################################################################################

Function makeNull(str)
If str="" or IsNull(str) then
makeNull = "NULL"
Else
makeNull = str
End IF
End Function

'##################################################################################
' HTML 태그 지우기 (정규식표현)
' 인자 : strHTML:문장, patrn : 패턴 문장
' retun 값 : String
'##################################################################################

Function stripHTML(strHTML, patrn)
Dim objRegExp, strOutput
Set objRegExp = New Regexp

objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = patrn

'objRegExp.Pattern = "<.+?>" '' 태그완전히없앰

strOutput = objRegExp.Replace(strHTML, "")

stripHTML = strOutput

Set objRegExp = Nothing
End Function

'##################################################################################
' 문자 잘라내기
'##################################################################################
Function CutString(Str,Length,Patten)
If Len(Str) > Length Then
CutString = Left(Str,Length-3) & patten
Else
CutString = Str
End If
End Function

별건 아니구요..그냥 가끔 디버깅시에 쓰는 함수에요
####################################################
Sub DbPrintErrMsg(obj)

Dim errLoop
For Each errLoop In obj.Errors
response.write "#############<br>"
response.write "Error Number: " & errLoop.Number & "<br>"
response.write "Description: " & errLoop.Description & "<br>"
response.write "Source: " & errLoop.Source & "<br>"
response.write "SQL State: " & errLoop.SQLState & "<br>"
response.write "Native Error: " & errLoop.NativeError & "<br>"
response.write "#############<br>"
Next
End Sub

########폼값 확인할때###################
Sub Prt_RequestForm(obj)

Dim item
For Each item In obj
response.write "#############<br>"
response.write item&" : " &obj(item)& "<br>"
response.write "#############<br>"
Next
End Sub
ex) Prt_RequestForm(Request.Form), Prt_RequestForm(Request.QueryString),
Prt_RequestForm(UploadForm)

첨부파일이 없습니다.
2011/11/23 18:40 2011/11/23 18:40
체크 박스 옵션이 많아져서 원하는 걸 찾기 어려울 때 사용하시면 됩니다.

몇 번 언급한 적이 있는 Coffeescript를 사용했습니다.



[index.html]

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>Checkbox Filter</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link href="stylesheet.css" media="screen" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<script src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js" type="text/javascript"></script>
<script src="application.coffee" type="text/coffeescript"></script>
</head>
<body>
<div id="container">
<form method="post" action="/">
<label for="input-filter">Filter:</label>
<input id="input-filter" type="text" name="filter" />
<ul>
<li>
<input id="id_1" type="checkbox" name="ids[]" value="1" />
<label for="id_1">#1 - AA</label>
</li>
<li>
<input id="id_2" type="checkbox" name="ids[]" value="2" />
<label for="id_2">#2 - BA</label>
</li>
<li>
<input id="id_3" type="checkbox" name="ids[]" value="3" />
<label for="id_3">#3 - AB</label>
</li>
<li>
<input id="id_4" type="checkbox" name="ids[]" value="4" />
<label for="id_4">#4 - BB</label>
</li>
<li>
<input id="id_5" type="checkbox" name="ids[]" value="5" />
<label for="id_5">#5 - ABC</label>
</li>
</ul>
</form>
</div>
</body>
</html>


[stylesheet.css]

body {
font-size: 12px;
background: #FFF;
color: #333;
margin: 0;
}

#container {
margin: 10px auto;
width: 600px;
padding: 10px;
}


[application,coffee]

$ ->
$('form').submit ->
false

$('input[name=filter]').live 'keyup', ->
query = $(this).val().toLowerCase()
if $(query).is(':blank')
$('form li').show()
else
$('form li').each (i, item) ->
text = $(item).find('label').text().toLowerCase()
if text.search(query) < 0
$(item).hide()
else
$(item).show()
2011/11/09 17:33 2011/11/09 17:33
Snoopy.class.php 다운받으셔서 경로만 맞춰주세요

<?
$g4_path = ".";
include_once("$g4_path/common.php");
include_once("$g4[path]/lib/mw.builder.lib.php");
if($shotbirdie_tkey){
$ti_de = urldecode($shotbirdie_tkey);
$g4[title] = "자료실 > 토렌트검색 : $ti_de";
}else{
$g4[title] = "자료실 > 토렌트검색";
}
@include_once("$g4[path]/head.php");
?>
<script language="Javascript" type="text/Javascript">
<!--
function MM_popupMsg(msg) { //v1.0
alert(msg);
}
//-->
</script>
<style>

.jyGuideBox {margin-top:30px; padding:20px; background:#f2f2f2;}
.jyGuideBox .txt_title {padding-left:20px; height:17px; line-height:19px; font-weight:bold; color:#333; background:url('./img/ico_sprites_bule.gif') no-repeat 2px 2px;}
.jyGuideBox ul {padding-top:8px;}
.jyGuideBox li {padding-left:20px; height:18px; line-height:20px; font-size:11px; color:#999; list-style:none; background:url('./img/ico_sprites_bule.gif') no-repeat 10px -30px;}
</style>
<!--상단검색-->
<table width="730" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="29"><img src="http://soncook2.cdn2.cafe24.com/shotbirdie/search_left.gif" width="29" height="79"></td>
<td valign="top" background="http://soncook2.cdn2.cafe24.com/shotbirdie/search_bodybg.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="40"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3" height="6"></td>
<td height="6"></td>
</tr>
<tr>
<td> </td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" class="search_txt">토렌트검색</td>
<td class="search_txt"><div align="right">
<?
$k01 = urlencode("1박2일");
$k02 = urlencode("무한도전");
$k03 = urlencode("런닝맨");
$k04 = urlencode("남자의자격");
$k05 = urlencode("영어공부");
$k06 = urlencode("음악");
$k07 = urlencode("성인");
$k08 = urlencode("서식");
$k09 = urlencode("자막");
$k10 = urlencode("강좌");
$k11 = urlencode("나는가수다");

?>
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k05?>'><span class='search_txt'><u>영어공부</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k11?>'><span class='search_txt'><u>나는 가수다</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k01?>'><span class='search_txt'><u>1박2일</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k02?>'><span class='search_txt'><u>무한도전</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k03?>'><span class='search_txt'><u>런닝맨</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k04?>'><span class='search_txt'><u>남자의자격</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k06?>'><span class='search_txt'><u>음악</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k07?>'><span class='search_txt'><u>성인</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k08?>'><span class='search_txt'><u>무료서식</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k09?>'><span class='search_txt'><u>자막</u></span></a> |
<a href='<?=$PHP_SELF?>?shotbirdie_tkey=<?=$k10?>'><span class='search_txt'><u>강좌</u></span></a>

</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="39"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<form type="get" action="<?=$PHP_SELF_SELF?>">
<tr>
<td><input name=shotbirdie_tkey maxlength=30 itemname="토렌트 검색어" required value='<?=$shotbirdie_tkey?>' style="width:620; height:22px;"></td>
<td width="60"><div align="right">
<input name="image" type=image src="http://soncook2.cdn2.cafe24.com/shotbirdie/search_bt.gif" align=absmiddle width="49" height="21" border=0>
</div></td>
</tr>
</form>
</table></td>
</tr>
</table></td>
<td width="20"><img src="http://soncook2.cdn2.cafe24.com/shotbirdie/search_right.gif" width="20" height="79"></td>
</tr>
</table>
<!--상단검색-->
<center>매일 10~11시, 15~16시, 20~23시는 비회원 다운로드 가능(회원은 언제나 가능)</center>
<?
if($shotbirdie_tkey == ''){ }else{
require './lib/Snoopy.class.php';
ini_set("allow_url_fopen","1");

switch($sort_code){
case 'a': //최근
$sort = "a/d/";
$scolor01 = "style='color: #990000;'";
break;
case 'c': //인기
$sort = "c/d/";
$scolor02 = "style='color: #990000;'";
break;
case 's': //시더
$sort = "s/d/";
$scolor03 = "style='color: #990000;'";
break;
case 'n': //이름
$sort = "n/d/";
$scolor04 = "style='color: #990000;'";
break;
case 'z': //크기
$sort = "z/d/";
$scolor05 = "style='color: #990000;'";
break;
default: //인기
$sort = "c/d/";
$scolor02 = "style='color: #990000;'";
$tpage = 1;
break;
}
switch($tpage){
case '1':
$tcolor01 = "style='color: #990000; font-weight:bold;'";
break;
case '2':
$tcolor02 = "style='color: #990000; font-weight:bold;'";
break;
case '3':
$tcolor03 = "style='color: #990000; font-weight:bold;'";
break;
default:
$tcolor02 = "style='color: #990000; font-weight:bold;'";
break;
}
$url = "http://bitsnoop.com/search/all/".$shotbirdie_tkey."/".$sort.$tpage."/?fmt=rss";
$snoopy = new Snoopy;
$snoopy->fetch($url);
$xml = @simplexml_load_string($snoopy->results);
$listct = '30'; //첫 파싱후 2번째부터는 수량조절용으로 사용(최적화를 위해)
//$listct = count($xml->item);

//테이블상단
echo "
<br><br>
<table width='730' height='30' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table width='100%' border='0' cellspacing='5' cellpadding='0'>
<tr>
<td width='50%' align='left'><a href='./bbs/board.php?bo_table=notice&wr_id=3' target='_blank'><font color='#990000'>토렌트 설치 및 사용법</a></td>
<td width='50%' align='right'>
<!--순서-->
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=a&tpage=$tpage'><span $scolor01>최신순</span></a> |
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=c&tpage=$tpage'><span $scolor02>인기순</span></a> |
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=s&tpage=$tpage'><span $scolor03>시드순</span></a> |
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=n&tpage=$tpage'><span $scolor04>이름순</span></a> |
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=z&tpage=$tpage'><span $scolor05>크기순</span></a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width='730' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td><table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td height='1' bgcolor='BFBFBF'></td>
</tr>
<tr>
<td height='32' bgcolor='FAFAFA'><table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td width='38' align='center'>번호</td>
<td width='500' align='center'>제목</td>
<td width='66' align='center'>크기</td>
<td width='38' align='center'>시드</td>
<td width='44' align='center'>마그넷</td>
<td width='44' align='center'>토렌트</td>
</tr>
</table></td>
</tr>
<tr>
<td height='1' bgcolor='EDEDED'></td>
</tr>
</table></td>
</tr>
<tr>
<td>
";
for($i=0; $i<$listct; $i++){
$wr_subject[$i] = $xml->channel->item[$i]->title;
$category[$i] = $xml->channel->item[$i]->category;
$link[$i] = $xml->channel->item[$i]->link;
$pubDate[$i] = $xml->channel->item[$i]->pubDate;
$numSeeders[$i] = $xml->channel->item[$i]->numSeeders;
$numLeechers[$i] = $xml->channel->item[$i]->numLeechers;
$numFiles[$i] = $xml->channel->item[$i]->numFiles;
$numComments[$i] = $xml->channel->item[$i]->numComments;
$size[$i] = $xml->channel->item[$i]->size;
$fileName[$i] = $xml->channel->item[$i]->torrent->fileName;
$url_join[$i] = 'http://torrage.com/torrent/'.$fileName[$i];
$contentLength[$i] = $xml->channel->item[$i]->torrent->contentLength;
$infoHash[$i] = $xml->channel->item[$i]->torrent->infoHash;
$magnetURI[$i] = $xml->channel->item[$i]->torrent->magnetURI;
$wr_content[$i] = $xml->channel->item[$i]->description;
//echo "$wr_subject / $fileName / $url_join<br>";
//순번
$num = $i+1;
//파일용량
$size[$i] = round(($size[$i] / 1024)/1024);

//회원가입에 따른차등
if(!$member['mb_id']){
//안내메세지
$tmsg = "매일 10~11시, 15~16시, 20~23시는 비회원 다운로드 가능하세요^^";

$timeinfo = getdate(time());
if(($timeinfo[hours] >= '10' and $timeinfo[hours] < '11') or ($timeinfo[hours] >= '15' and $timeinfo[hours] < '16') or ($timeinfo[hours] >= '20' and $timeinfo[hours] < '23')){
$magnetURI_m[$i] = "<a href='$magnetURI[$i]' target='_blank' onClick=\"MM_popupMsg('$tmsg')\"><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img01.GIF' border='0'></a>";
$url_join_m[$i] = "<a href='$url_join[$i]' target='_blank' onClick=\"MM_popupMsg('$tmsg')\"><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img02.GIF' border='0'></a>";
}else{
$magnetURI_m[$i] = "<a href='http://web.search.naver.com/search.naver?where=site&sm=dir_hty&query=%BC%A6%B9%F6%B5%F0&ctgids=' target='_blank' onClick=\"MM_popupMsg('$tmsg-샷버디 클릭후에 로그인 해주시면 됩니다')\"><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img01.GIF' border='0'></a>";
$url_join_m[$i] = "<a href='http://web.search.naver.com/search.naver?where=site&sm=dir_hty&query=%BC%A6%B9%F6%B5%F0&ctgids=' target='_blank' onClick=\"MM_popupMsg('$tmsg-샷버디 클릭후에 로그인 해주시면 됩니다')\"><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img02.GIF' border='0'></a>";
}
}else{ //로그인시
$magnetURI_m[$i] = "<a href='$magnetURI[$i]'><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img01.GIF' border='0'></a>";
$url_join_m[$i] = "<a href='$url_join[$i]'><img src='http://soncook2.cdn2.cafe24.com/shotbirdie/torrent_img02.GIF' border='0'></a>";
}

//중복내용
echo "
<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td><table width='100%' height='33' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td width='38' align='center'>$num</td>
<td width='500'>$wr_subject[$i]</td>
<td width='66' align='center'>$size[$i]MB</td>
<td width='38' align='center'>$numSeeders[$i]</td>
<td width='44' align='center'>$magnetURI_m[$i]</td>
<td width='44' align='center'>$url_join_m[$i]</td>
</tr>
</table></td>
</tr>
<tr>
<td height='1' bgcolor='EDEDED'></td>
</tr>
</table>
";
//echo "$num - <a href='$url_join[$i]' target='_blank'>$wr_subject[$i]</a><br>";
}//end for($i)
//테이블하단
echo "
</td>
</tr>
<tr>
<td align='center'>
<!--페이지-->
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=$sort_code&tpage=1'><span $tcolor01>1</span></a> |
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=$sort_code&tpage=2'><span $tcolor02>2</span></a> |
<a href='$PHP_SELF_SELF?shotbirdie_tkey=$shotbirdie_tkey&sort_code=$sort_code&tpage=3'><span $tcolor03>3</span></a>
</td>
</tr>
</table>
";
} //end if(shotbirdie_tkey)
?>
<div class="jyGuideBox">
<p class="txt_title">반드시 읽어보세요.</p>
<ul>
<li>본 서비스는 토렌트 외부 검색기로, 토렌트 통합검색을 제공합니다.</li>
<li>검색자료는 서버에 저장, 관리 하지 않으며, 검색 및 다운로드만을 제공합니다.</li>
<li>업로드 서비스는 제공되지 않으며, 이미지를 제공하지 않습니다.</li>
<li>일부 파일은 다운로드 되지 않을 수 있으며, 자료의 질에 대해서는 보장하지 않습니다.</li>
</ul>
</div>
<?
//유가정보

?>
<?
@include_once("$g4[path]/tail.php");
?>      
                                
2011/10/24 12:20 2011/10/24 12:20