main.php 805 Bytes
Newer Older
SMSLink.ro's avatar
SMSLink.ro committed
1
2
3
4
5
<?php

$client = new http\Client;
$request = new http\Client\Request;

SMSLink.ro's avatar
Update    
SMSLink.ro committed
6
7
8
9
10
11
12
/*

  HTTPS API Endpoint:  https://secure.smslink.ro/sms/gateway/communicate/index.php
  HTTP API Endpoint:   http://www.smslink.ro/sms/gateway/communicate/index.php

*/

SMSLink.ro's avatar
SMSLink.ro committed
13
14
15
16
17
18
19
20
21
22
23
$request->setRequestUrl('https://secure.smslink.ro/sms/gateway/communicate/index.php');
$request->setRequestMethod('GET');

/* 

  Get your SMSLink / SMS Gateway Connection ID and Password from 
  https://www.smslink.ro/get-api-key/

*/

$request->setQuery(new http\QueryString(array(
SMSLink.ro's avatar
Update    
SMSLink.ro committed
24
25
26
27
  'connection_id' => '... My SMS Gateway Connection ID ...',
  'password' => '... My SMS Gateway Password ...',
  'to' => '07xyzzzzzz',
  'message' => 'My Test Message'
SMSLink.ro's avatar
SMSLink.ro committed
28
29
30
31
32
33
34
35
)));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();

?>