Easy way to SMS verify accounts - Take 2

fatboy

Elite Member
Joined
Aug 13, 2008
Messages
1,615
Reaction score
3,262
After I posted about Tropo, a few people have mentioned having problems so I have found another site that has just started up that runs along the same lines.

At the moment its free due to it being in 'alpha' stage but I had a quick play last night and it sends / receives texts in a few seconds and you can get free numbers.

Only downsides are that at the moment it would appear to be only Swedish mobile numbers but hey, free is free and that you will need to know a bit of coding as everything is controlled by GET requests.

If you take a look at curl you should be good to go - I did a couple of tests scripts in a few minutes.


Site is:
Code:
46elks.com

Have fun.
 
Last edited:
Here are a few simple scripts to get you started:

Getting a new number and setting up a script to push all SMS messages to :
Code:
<?php
	$url = "https://api.46elks.com/a1/Numbers";
	$postFields = "country=se&sms_url=http://domain.com/newsms.php";

	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_USERPWD, "46elks-userame:46elks-password");
	curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
	$xmlResponse = curl_exec($ch);

	print $xmlResponse;
?>

Get a list of your current numbers:
Code:
<?php
	$url = "https://api.46elks.com/a1/Numbers";
	$postFields = "";

	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_USERPWD, "46elks-username:46elks-password");
	#curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
	$xmlResponse = curl_exec($ch);

	print $xmlResponse;
?>

Based on those two coupled with the API documents at 46elks, you should be able to work it out fine :)

Had a spare 5 minutes so did the above scripts and tested it by setting up a Gmail with SMS verification and all went well.
 
Nice, just one noob question. I need to set up a web server to run this, right?
 
Nice, just one noob question. I need to set up a web server to run this, right?

You just need a way of sending requests (POST or GET) to the 46elks API. I ran those scripts from my Ubuntu laptop.
 
or can someone explain how to use this for receiving sms ?
 
PHP:
<?php
    $url = "https://api.46elks.com/a1/Numbers";
    $postFields = "country=se";

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERPWD, "ua43fee3cbec0f0a***:D09FDF5E61B741***");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
    $xmlResponse = curl_exec($ch);

    print $xmlResponse;
?>

I used this in localhost but I always get a blank page! is there anything wronge?
 
PHP:
<?php
    $url = "https://api.46elks.com/a1/Numbers";
    $postFields = "country=se";

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERPWD, "ua43fee3cbec0f0a***:D09FDF5E61B741***");
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
    $xmlResponse = curl_exec($ch);

    print $xmlResponse;
?>

I used this in localhost but I always get a blank page! is there anything wronge?
 
Can someone give an instriction how to setup ut?

What to change in scripts?
 
Back
Top