티스토리 뷰

 

 

운영하는 미니피시에   

smsgateway 를 설치하고 내 문자메세지를

가지고 무료로 php 파일로 연결해서 

무료 문자발송(무제한 요금제인경우)

 

 

GitHub - capcom6/android-sms-gateway: The SMS Gateway for Android™ app enables sending and receiving SMS messages through an A

The SMS Gateway for Android™ app enables sending and receiving SMS messages through an API that can be accessed directly on the device or via a cloud server when direct device access is not possibl...

github.com

 

 

 

앱을 설치하고

아래 화면에 출력됩니다

 

 

 

 

 

설정에서

server 부분을 클릭하고

api 주소와 바로 아래 토큰입력란에

토큰만 입력하면 됩니다

 

 

 

<?php
/**
 * 이 파일에는 본인 계정 인증정보가 포함되어 있습니다. 다른 사람과 공유하지 마세요.
 * 관리자가 설정한 일일 발송 한도가 있으면 자동으로 적용됩니다.
 */
function sendSms(string $phoneNumber, string $text): array
{
    $url = 'https://접속주소';
    $payload = json_encode([
        'username' => '앱아이디',
        'password' => '앱비번',
        'phoneNumber' => $phoneNumber,
        'text' => $text,
    ]);
    $ch = curl_init($url);
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => $payload,
        CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
        CURLOPT_TIMEOUT => 15,
    ]);
    $response = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    $error = curl_error($ch);
    curl_close($ch);
    return ['status' => $httpCode, 'error' => $error, 'body' => json_decode($response, true)];
}

$result = sendSms('+8210xxxxxxxx', '보낼 문자 내용');
echo json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);

 

 

위와 같이 실시간

바로 적용해서 사용가능합니다

 

 

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2026/08   »
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
글 보관함