정보기술

Finding the current location (PHP)

The location is obtained through the Geolocation function, and if it is a browser that is not related or supported, the location is obtained with the IPI through the API provided by Naver. Before use, get Naver's API key to the address below (https://www.ncloud.com/product/applicationService/geolocation) <? Function Makesignature ($ Secretkey, $ Method, $ Basestring, $ Timestamp, $ AccessKey) { $ space = '; $ newline = "\ n"; $ hmac = $ method. $ space. $ baseString. $ signaute = base64_encode (hash_hmac ('SHA256', $ HMAC, $ Secretkey, True)); return $ signaute; } if ($ _ POST ['ORDER'] == 'geolocation') { $hostNameUrl = 'https://geolocation.apigw.ntruss.com'; $requestUrl= '/geolocation/v2/geoLocation'; $accessKey...

SSH port change (Centos)

SSHD settings VI/ETC/SSH/SSHD_CONFIG Port {port number} Service SSHD RESTART Firewall setting VI/ETC/Sysconfig/iptables -A input -M State -state New -M TCP -P TCP -DPORT {Port} -j Accept Service iptables Restart * After changing the SSH port, the firewall setting allows you to use that port.

php.ini file settings

Confirm after installing the server Short_open_tag = ON "<? PHP" and "<?" Make it available. Display_errors = On When executing a PHP script, the message is output when the error occurs. (In case of OFF, HTTP 500 internal server error output) Date.TIMEZONE = Asia/SEOUL Set the time zone. error_reporting = e_all & ~ e_notice & ~ e_deprecated NOTICE error is ignored. (* php.ini path: PHP --ini | grep php.ini)