Đang chuẩn bị liên kết để tải về tài liệu:
Mobile Web Development phần 6

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Bạn có thể gửi một tin nhắn kiểm tra bằng cách nhập địa chỉ URL trong trình duyệt của bạn và thay thế xxxx với các giá trị thích hợp. Hãy nhớ rằng tất cả các chi phí tin nhắn! Hầu hết các cổng sẽ cung cấp một số khoản tín dụng miễn phí hoặc giảm giá cho các tin nhắn thử nghiệm, | Sending Text Messages You can send a test message by entering the URL in your browser and replacing xxxx with proper values. Keep in mind that every message costs Most gateways will provide some free credits or discounted rates for test messages but the meter keeps running for every message you send Our meter for Luigi is also running so let us proceed with integrating the Clickatell API into the POTR code. We will first write a wrapper class to integrate with Clickatell. This will keep the integration distinct from other code and make it easier to manage changes. Essentially it will send GET requests and process the response. Here is how the API works for Clickatell To Authenticate and Get a Session Command http api.clickatell.com http auth api_id xxxx user xxxx password xxxx. Response OK Session ID or ERR Error number. To Send an SMS after Authenticating Command http api.clickatell.com http sendmsg session_id xxx x to xxxx text xxxx. Response ID apimsgid or ERR Error number Based on this let s write up our wrapper class. Time for Action Integrating with Clickatell to Send SMS Notifications 1. The first step in Clickatell integration is to authenticate and get a session ID. We can use this session ID in all further requests. Let us start our SMSGateway class with some basic variables and initialization functions. php class SMSGateway private apiURL private apiId private sessionId public lastCommand public lastResult public function __construct this- apiURL http api.clickatell.com http 104 Chapter 6 public function Init username password apiId this- apiId apiId params user username params password password params api_id this- apiId command auth if this- Request command params return true 2. The request function takes the name of the command and an array of parameters to pass. We will make a HTTP GET request to the Clickatell API URL and process the response string. The basic pattern of the response string is two parts separated by a colon. The first part is the .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.