LebGeeks

A community for technology geeks in Lebanon.

You are not logged in.

#1 February 16 2006

mir
Member

Send SMS!

Hi guys,

I am working on a website . I would need to Send  an SMS every time a certain event happen

let us say when a customer puts a car on sale for a nice price.
I want the admin to receive an alert for that.

We are trying to do this, using different free sms services available on the net.
cuz a paid one would need such a long procedure and are costy.

So, Web gurus and Geeks, i would like to receive ur feedback about ANY SMSing startegy.
the paid and unpaid ones.

or in general how to send data from application to an X website.
(remember the guys that used to crack hotmail in the old days by bruteforcing
they used app to send data to website)
(i know some sites that don't require to enter letters )

or if anyone has any idea on how to automatically alert a person other than mail and sms i might consider this as alternative

Last edited by mir (February 16 2006)

Offline

#2 February 17 2006

mahdoum
Member

Re: Send SMS!

employ someone to refresh the page every 5 minutes, and when something comes up have him call the boss

Offline

#3 February 18 2006

samer
Admin

Re: Send SMS!

@mahdoum: hehe
@mir: here's what you can do:

subscribe to alfa power's Mobi Mail service. you'll get a insertyournumber@alfa.com.lb address that forwards emails received to your phone. all you have to do is write a php script that uses the mail() function to send you an e-mail each time X even occurs.

Offline

#4 February 19 2006

mir
Member

Re: Send SMS!

Oh! thank u very mush for ur help.
they would actually forward the whole mail message ?
i wonder for how much

thank u again for ur help.

Offline

#5 February 21 2006

samer
Admin

Re: Send SMS!

Alfa power gives you 3 services for 3 months for a flat fee of $15.

they would actually forward the whole mail message ?

I don't know about that :/

Offline

#6 February 22 2006

rolf
Member

Re: Send SMS!

HTTP is pretty easy
you can directly send HTTP, see documentation on the net for http headers etc...

To retrieve an http page, for example to get google.com, all you have to do is connect to google.com on port 80  (usually HTTP is on port 80) and send the following text:

GET /

And the server will send you back the page. Now of course you can also use HTTP to send data from the client to the server, it's usually done via http POST, for example, to send my login information to the gds login page, i open the server (for example login.idm.net.lb ) at port 80 and send the following raw text:

POST /user/refresh/home HTTP/1.1

username=username@idm.net.lb&domain=@idm.net.lb&password=secret

Now that's an HTTP POST. For this login page, the post information is actually:

username=username@idm.net.lb&domain=@idm.net.lb&password=secret

Now for the SMS page, the post info would probably be something like:

mobile_number=123456&message=here is the message

The best way of knowing the format of POST message is to use a "packet sniffer" that is a software that will capture the communications of your computer, and then you can analyse the packets and see how they are to reproduce them. I recommend ethereal, it's really the best packet capture around (open source and multi platform). Just launch it , start capture, then open the website you want to send sms from, send an sms, then stop capture and examine the packets that were sent to that website.

If you capture the login of GDS for example, you'll actually see:

POST /user/refresh/home HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://194.126.7.2:8080/home
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705)
Host: 194.126.7.2:8080
Content-Length: 67
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID=3q7fwkam1pjh; cookies=false

username=username@idm.net.lb&domain=@idm.net.lb&password=secret

As you can see, this real life example is considerably longer then the example at the beginning of the post. that's because it includes HTTP headers, which are lines in the format:
header_name : header_value
They are used to send various types of info between the server and the client, like for example the browser name, the types of files accepted, cookies, caching policies, etc... They are usually optional, ya3neh you dont need to send them but it doesnt hurt to do so.

Now if the website uses HTTPS (secure HTTP) I cant help you on that. I know HTTPS is actually HTTP over SSL, but I cant tell you more. You may in this situation need to use libraries in your program.
You may also, and it's an easy solution but also the least performing solution, run an instance of internet explorer through COM. You can use COM (Componet object model, a microsoft technology) to launch an invisible instance of internet explorer and control it, filling fields and clicking buttons from within your programs. It will be exactly as iif someone had opened internet explorer and was typing and clicking the buttons. But it is technically and performance wise a bad idea, and it may give you problems, for example if SSL the certificate of the website is not valid, it will popup a certificate not valid warning box, and for some reason there is no way to automate clicking OK on that box.

Last edited by rolf (February 22 2006)

Offline

Board footer