Hi, I would like to conect to a server by a SSL Conection,
to send an SMS.
The company that offers the SMS service provided some Code for a http
connection, but not for a https connection.
Here is the code to send an SMS by http, which works great.
Can you help / or do you know a good tutorial / website for php and
ssl ???
thanx,
marcus
<?
$user = "user";
$password = "password";
$api_id = "xxxx";
$baseurl ="http://api.clickatell.com";
$text = urlencode("This is an example message");
$to = "0123456789";
// auth call
$url = "$baseurl/http/auth?user=$user&password=$password&api_id=$api_id" ;
// do auth call
$ret = file($url);
// split our response. return string is on first line of the data
returned
$sess = split(":",$ret[0]);
if ($sess[0] == "OK") {
$sess_id = trim($sess[1]); // remove any whitespace
$url = "$baseurl/http/sendmsg?session_id=$sess_id&to=$to&text=$text";
// do sendmsg call
$ret = file($url);
$send = split(":",$ret[0]);
if ($send[0] == "ID")
echo "success<br>message ID: ". $send[1];
else
echo "send message failed";
} else {
echo "Authentication failure: ". $ret[0];
exit();
}
?> 17 3172
Hi,
On 6 Apr 2004 16:57:06 -0700, Do****@gmx.de (Stefan Richter) wrote: Hi, I would like to conect to a server by a SSL Conection, to send an SMS. The company that offers the SMS service provided some Code for a http connection, but not for a https connection.
Here is the code to send an SMS by http, which works great. Can you help / or do you know a good tutorial / website for php and ssl ???
Try the curl extension, or maybe Snoopy on Sourceforge. Both do SSL.
HTH, Jochen
thanx, marcus
<? $user = "user"; $password = "password"; $api_id = "xxxx"; $baseurl ="http://api.clickatell.com"; $text = urlencode("This is an example message"); $to = "0123456789"; // auth call $url = "$baseurl/http/auth?user=$user&password=$password&api_id=$api_id" ; // do auth call $ret = file($url); // split our response. return string is on first line of the data returned $sess = split(":",$ret[0]); if ($sess[0] == "OK") { $sess_id = trim($sess[1]); // remove any whitespace $url = "$baseurl/http/sendmsg?session_id=$sess_id&to=$to&text=$text"; // do sendmsg call $ret = file($url); $send = split(":",$ret[0]); if ($send[0] == "ID") echo "success<br>message ID: ". $send[1]; else echo "send message failed"; } else { echo "Authentication failure: ". $ret[0]; exit(); } ?>
--
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces. http://sourceforge.net/projects/phpdbedittk/
I saw something about curl before.
Though - what is curl???
"Jochen Daum" <jo*********@cabletalk.co.nz> schrieb im Newsbeitrag
news:af********************************@4ax.com... Hi,
On 6 Apr 2004 16:57:06 -0700, Do****@gmx.de (Stefan Richter) wrote:
Hi, I would like to conect to a server by a SSL Conection, to send an SMS. The company that offers the SMS service provided some Code for a http connection, but not for a https connection.
Here is the code to send an SMS by http, which works great. Can you help / or do you know a good tutorial / website for php and ssl ??? Try the curl extension, or maybe Snoopy on Sourceforge. Both do SSL.
HTH, Jochen
thanx, marcus
<? $user = "user"; $password = "password"; $api_id = "xxxx"; $baseurl ="http://api.clickatell.com"; $text = urlencode("This is an example message"); $to = "0123456789"; // auth call $url = "$baseurl/http/auth?user=$user&password=$password&api_id=$api_id" ; // do auth call $ret = file($url); // split our response. return string is on first line of the data returned $sess = split(":",$ret[0]); if ($sess[0] == "OK") { $sess_id = trim($sess[1]); // remove any whitespace $url = "$baseurl/http/sendmsg?session_id=$sess_id&to=$to&text=$text"; // do sendmsg call $ret = file($url); $send = split(":",$ret[0]); if ($send[0] == "ID") echo "success<br>message ID: ". $send[1]; else echo "send message failed"; } else { echo "Authentication failure: ". $ret[0]; exit(); } ?>
-- Jochen Daum - Cabletalk Group Ltd. PHP DB Edit Toolkit -- PHP scripts for building database editing interfaces. http://sourceforge.net/projects/phpdbedittk/
Hi,
On Wed, 7 Apr 2004 02:12:20 +0200, "Stefan Schneider"
<ma****@site-ezy.com> wrote: I saw something about curl before. Though - what is curl???
Its a library that handles all kind of internet protocols, HTTP, FTP,
telnet etc.
There's an extension in php. Check out www.php.net and Google.
HTH, Jochen
"Jochen Daum" <jo*********@cabletalk.co.nz> schrieb im Newsbeitrag news:af********************************@4ax.com.. . Hi,
On 6 Apr 2004 16:57:06 -0700, Do****@gmx.de (Stefan Richter) wrote:
>Hi, I would like to conect to a server by a SSL Conection, >to send an SMS. >The company that offers the SMS service provided some Code for a http >connection, but not for a https connection. > >Here is the code to send an SMS by http, which works great. >Can you help / or do you know a good tutorial / website for php and >ssl ??? > Try the curl extension, or maybe Snoopy on Sourceforge. Both do SSL.
HTH, Jochen
>thanx, >marcus > > ><? >$user = "user"; >$password = "password"; >$api_id = "xxxx"; >$baseurl ="http://api.clickatell.com"; >$text = urlencode("This is an example message"); >$to = "0123456789"; >// auth call >$url = "$baseurl/http/auth?user=$user&password=$password&api_id=$api_id" ; >// do auth call >$ret = file($url); >// split our response. return string is on first line of the data >returned >$sess = split(":",$ret[0]); >if ($sess[0] == "OK") { >$sess_id = trim($sess[1]); // remove any whitespace >$url = "$baseurl/http/sendmsg?session_id=$sess_id&to=$to&text=$text"; >// do sendmsg call >$ret = file($url); >$send = split(":",$ret[0]); >if ($send[0] == "ID") >echo "success<br>message ID: ". $send[1]; >else >echo "send message failed"; >} else { >echo "Authentication failure: ". $ret[0]; >exit(); >} >?>
-- Jochen Daum - Cabletalk Group Ltd. PHP DB Edit Toolkit -- PHP scripts for building database editing interfaces. http://sourceforge.net/projects/phpdbedittk/
--
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces. http://sourceforge.net/projects/phpdbedittk/
Just checked - it's not installed on our server, and I doubt
it will be.
Is there a way to do without???
Stefan
Hi,
On Wed, 7 Apr 2004 03:35:45 +0200, "Stefan Richter"
<ma****@site-ezy.com> wrote: Just checked - it's not installed on our server, and I doubt it will be.
Is there a way to do without???
I think I have mentioned Snoopy on Sourceforge. Have you looked that
up as well?
Jochen Stefan
--
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces. http://sourceforge.net/projects/phpdbedittk/
No, I can't install anything new at all.
Stefan
>Hi, I would like to conect to a server by a SSL Conection, to send an SMS. The company that offers the SMS service provided some Code for a http connection, but not for a https connection.
If the company does not provide https on their server,
code on your end won't help.
Gordon L. Burditt
Hello,
On 04/06/2004 08:57 PM, Stefan Richter wrote: Hi, I would like to conect to a server by a SSL Conection, to send an SMS. The company that offers the SMS service provided some Code for a http connection, but not for a https connection.
There is no need to reinvent the wheel. Here is a class that does
exactly what you want:
Class: Clickatell SMS API http://www.phpclasses.org/smsapi
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html
Hi Manuel,
just had a short look on it,
and it really seems to be exactly what I need -
though it also talks about curl -
does that mean that the php file has curl code included,
or does it mean that I still need to install the curl library,
which my supervisor doesn't want me to...
Clickatell provides https on their server,
but I am not allowed to install a lib on our server,
the one that contacts clickatells server.
Stefan,
On Wed, 7 Apr 2004 04:21:24 +0200, "Stefan Richter"
<ma****@site-ezy.com> wrote: No, I can't install anything new at all.
And that tells me that you haven't looked, because its just a bunch of
PHP scripts.
Jochen
--
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces. http://sourceforge.net/projects/phpdbedittk/
Oh god I am looking for an example the whole day already!!!
If you know one, could you be so nice to tell me the adress???
Stefan
On Wed, 7 Apr 2004 07:18:23 +0200, "Stefan Richter"
<ma****@site-ezy.com> wrote: Oh god I am looking for an example the whole day already!!! If you know one, could you be so nice to tell me the adress???
I'm really getting concerned now. I think you still have not entered Snoopy sourceforge<<< into Google and I'm not gonna do it for you.
HTH,
Jochen
--
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces. http://sourceforge.net/projects/phpdbedittk/
Jochen Daum <jo*********@cabletalk.co.nz> wrote in message news:<lp********************************@4ax.com>. .. On Wed, 7 Apr 2004 07:18:23 +0200, "Stefan Richter" <ma****@site-ezy.com> wrote:
Oh god I am looking for an example the whole day already!!! If you know one, could you be so nice to tell me the adress???
I'm really getting concerned now. I think you still have not enteredSnoopy sourceforge<<< into Google and I'm not gonna do it for you.
IIRC, Snoopy requires the command line cURL. The OP says he cannot
install anything on his server. So, I'm skeptical that he may not even
use Snoopy either.
The cURL alternative will be fsockopen()
<http://in2.php.net/fsockopen> . The recent PHP versions support
ssl://, but I think for that we need to have openssl enabled.
-- http://www.sendmetoindia.com - Send Me to India!
Email: rrjanbiah-at-Y!com
On Wed, 07 Apr 2004 17:20:32 +1200, Jochen Daum wrote: On Wed, 7 Apr 2004 07:18:23 +0200, "Stefan Richter" <ma****@site-ezy.com> wrote:
Oh god I am looking for an example the whole day already!!! If you know one, could you be so nice to tell me the adress???
I'm really getting concerned now. I think you still have not enteredSnoopy sourceforge<<< into Google and I'm not gonna do it for you.
HTH,
Jochen
He's a waste of space Jochen... look at the way he posts.. think that he
_really_ understands PHP if he can't even quote / post correctly? =)
Some people are worth helping / advising in this world.. normally the ones
that actualy _listen_ to the help / advice.. not bevave like Stephan here.
It's sad really.
Regards,
Ian
--
Ian.H
digiServ Network
London, UK http://digiserv.net/
Hi Rajesh,
On 7 Apr 2004 03:26:21 -0700, ng**********@rediffmail.com (R. Rajesh
Jeba Anbiah) wrote: Jochen Daum <jo*********@cabletalk.co.nz> wrote in message news:<lp********************************@4ax.com>. .. On Wed, 7 Apr 2004 07:18:23 +0200, "Stefan Richter" <ma****@site-ezy.com> wrote:
>Oh god I am looking for an example the whole day already!!! >If you know one, could you be so nice to tell me the adress??? >
I'm really getting concerned now. I think you still have not entered >>>Snoopy sourceforge<<< into Google and I'm not gonna do it for you.
IIRC, Snoopy requires the command line cURL. The OP says he cannot install anything on his server. So, I'm skeptical that he may not even use Snoopy either.
I used Snoopy on a server without curl.
HTH, Jochen
--
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces. http://sourceforge.net/projects/phpdbedittk/
Jochen Daum <jo*********@cabletalk.co.nz> wrote in message news:<0s********************************@4ax.com>. .. Hi Rajesh,
On 7 Apr 2004 03:26:21 -0700, ng**********@rediffmail.com (R. Rajesh Jeba Anbiah) wrote:
Jochen Daum <jo*********@cabletalk.co.nz> wrote in message news:<lp********************************@4ax.com>. .. On Wed, 7 Apr 2004 07:18:23 +0200, "Stefan Richter" <ma****@site-ezy.com> wrote:
>Oh god I am looking for an example the whole day already!!! >If you know one, could you be so nice to tell me the adress??? >
I'm really getting concerned now. I think you still have not entered >>>Snoopy sourceforge<<< into Google and I'm not gonna do it for you.
IIRC, Snoopy requires the command line cURL. The OP says he cannot install anything on his server. So, I'm skeptical that he may not even use Snoopy either.
I used Snoopy on a server without curl.
I think, that might be the old version (one without ssl support eg.
<http://turma.sourceforge.net/web/urlator/snoopy.html>).
Just checked their changelog:
Version 0.94
------------
- Added SSL support via cURL
<snip>
And in recent v1.01 <http://sourceforge.net/projects/snoopy/>, they
use commandline cURL for ssl.
-- http://www.sendmetoindia.com - Send Me to India!
Email: rrjanbiah-at-Y!com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: John Lemire |
last post by:
Hi,
I have a connection which after an initial handshake has one way traffic.
I am sending bursty data. When I write a data buffer (variable size) the
last portion of it is not sent to the server...
|
by: yaron |
last post by:
Hi,
I have a problem when sending data over TCP socket from c# client to java
server.
the connection established ok, but i can't send data from c# client to java
server.
it's work ok with...
|
by: Eric Sheu |
last post by:
Greetings,
I have been searching the web like mad for a solution to my SMTP problem. I
am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a
web site I have created to...
|
by: Martin Bürkle |
last post by:
Hi NG,
I have writen a programm using TCP sockets. After i get the connection
to another socket I cut the Ethernet cable. Then I send a message.
The program doesnt raise any exception. Can...
|
by: sridhar |
last post by:
iam having user account on an exchangeserver.
with that can i send an email using python?
if iam using the following code iam getting error
fromAddress = 'sridhar_kasturi@satyam.com'...
|
by: satnamsarai |
last post by:
Using System.Net.Mail: Sometimes I get error 'failure sending mail.
Unable to write data to the transport connection: An existing
connection was forcibly closed by the remote host.' Not sure how...
|
by: undbund |
last post by:
Hi I am creating a newsletter system. The software should run from
desktop computer (localhost) but be able to send email to anyone on
the internet. Can you guys give me some ideas on how to...
|
by: Keith G Hicks |
last post by:
I'm using the following code to send out email messages to a list of people
in a database. My problem is that if I'm sending to 100 people and the 40th
address is bad, it crashes on that one and...
|
by: happyse27 |
last post by:
Hi All,
I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |