목록개발 경험 Tip/PHP (42)
웹스쿨
123456789101112$fp = fsockopen('phpschool.com',80,$errno,$errstr,10); if ( $fp ) { $send = 'GET /images/common/top/phpschool_top_logo.png HTTP/1.0'."\r\n"; $send.= 'Host: phpschool.com'."\r\n"; $send.= 'Connection: Close'."\r\n\r\n"; fwrite($fp,$send); $content = ''; while ( !feof($fp) ) $content.= fread($fp,1024); $content = substr($content,strpos($content,"\r\n\r\n")+4); fclose($fp); file_put_..
본인의 홈페이지에 게시글이 작성되거나, 댓글이 작성되었을 경우텔레그램 API를 이용하여 관리자가 본인 스마트폰으로 알림 push를 받을수 있게 개발을 할 수 있다. 메뉴얼 링크는 아래와 같다. https://core.telegram.org/bots/samples https://core.telegram.org/bots/samples/hellobot 하지만 우리의 개발자들 중에 영어에 약한 분들이 존재하는 관계로 친절하게 한글로 설명을 하겠다. 개발언어는 php 이다. 순서는 아래와 같다.1. push를 발송할 bot(봇)을 생성한다.2. bot(봇)의 token(토큰)을 발급받는다.3. bot(봇)과 token(토큰)을 이용하여 클라이언트의 message_id(메세지 id)값을 생성한다. 자 1번부터 가보..