Cheap Global SMS Widget / White-Label

Just as you can access the widget URL (or webview) directly at https://cheapglobalsms.com/widget , you can as well embed it in your applications or simple HTML webpages.

E.G. Loading the widget into an iframe is demonstrated below:

<iframe 
src='//cheapglobalsms.com/widget' 
style='width:100%;height:560px;border:1px solid #bbb;border-radius:3px;'>
</iframe>

Optional Proceedure For White-Labeling Cheap Global SMS Through Your Own Website URL

  1. First, create your account and login
  2. Buy the amount of sms credits that you want in bulk here
  3. Create a sub-account for each of your customer, and add credits to the created sub-account as needed
  4. Now on your own website, you would have a webpage on which you are loading the widget in an iframe (here is a sample code for full-screen frame)
    <!DOCTYPE html>
    <html lang="en">
    	<head>
    		<meta charset="utf-8">
    		<title>Global SMS Portal</title>
    		<link rel="icon" type="image/x-icon"  href="./favicon.ico" />
    		<meta name="viewport" content="width=device-width, initial-scale=1.0">
    	</head>
    	<body style='background-color:#11d815;margin:0px;;'>
    		<div style='position:fixed;top:0px;width:100%;color:#ffffff;font-size:35px;font-weight:bold;'>
    			<img src='./logo.png' style='max-height:50px;vertical-align:middle;' />
    			<span style=''>SMS PORTAL</span>
    		</div>
    		
    		<iframe 
    		src="//cheapglobalsms.com/widget" 
    		style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">
    		</iframe>
    
    	</body>
    </html>
    
    You may customize your page as you like (e.g by appending your logo above the iframe on the webpage)
  5. Then you can direct the users to your customized url that you created above, after you have given them their login credentials (sub-account and password)
In fact, you may load any of the widget url with hidden menu-tabs. Simply add the parameter no_tabs=1. And to reaveal it again, use no_tabs=0.
E.G: to directly load the 'send_sms' page as the only visible and active page for an auto-logged-in account:
//cheapglobalsms.com/widget?no_tabs=1&a=send_sms&token=[Your Token]

Here is an example of CGSMS widget, loaded into an iframe


TIPS: Sub-accounts can easily be created for free here.

Auto-login URL

Supposing that you are importing the widget into a page on your admin panel, the sample php code describes how to generate a url that could be used; in order to be automatically logged in.
<?php
 $sub_account='001_mysub1';
 $sub_account_pass='pa55w0Rd';

 $token=base64_encode($sub_account.':'.$sub_account_pass);

 $url="http://cheapglobalsms.com/widget/?token=$token";
?>
So for instance, to load the above authenticated url via iframe could be like:
<iframe src='<?php echo $url; ?>' style='width:100%;height:560px;border:1px solid #bbb;border-radius:3px;'></iframe>

Optional Parameters

Parameter Description Example
token Token generated from base64_encode(sub_account+':'+sub_account_pass) YUBiYy5jb206cGFzc3dvcmQ
page Pre-define the landing page. (to be used with token, otherwise loggin in will still be required)
It can be any of the following:
account, send_sms, sms_log, sms_batches, contacts, sub_transactions, coverage_list, gateway_api
send_sms
no_translate Value 1 hides the language translator switch, while value 0 makes the switch to be displayed 0
no_tabs Value 1 hides the menu tab-panel at the top, while value 0 makes the tab to be displayed 0
tabs_list The list of menus that should be visible on the tab; separated with comma (,).
It can be any combination of the following:
account, send_sms, sms_log, sms_batches, contacts, sub_transactions, coverage_list, gateway_api
send_sms,sms_log,contacts
disable_login Value 1 hides the menu tab-panel at the top, while value 0 makes the tab to be displayed 0

Web-server Proxy Method

If you prefer to incorporate the widget more, by loading it form server-side.
One method is through the htaccess directive as indicated below.
  1. Create a folder in your web-directory to serve as the portal
  2. Create a file, named as .htaccess in the folder, with the following content:
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule (.*) http://cheapglobalsms.com/widget/$1 [P,L]
NB: Your web-server should have mod_rewrite and mod_proxy enabled to support this feature.