SMS-уведомления (...)
Модераторы: SLEDopit, Модераторы разделов
-
ch_IP
- Сообщения: 45
- ОС: FreeBSD 6.2-RELEASE
SMS-уведомления
Вот захотел чтобы с сервака мне приходили на телефон sms-уведомления.
Решил сделать так: по крону запускать php из консоли и вводить туда URL c нужными аргументами:
a la:
# php http://www.opsos-site.ry/sms/send.php?[send_arguments]
Но такой вариант я даже не смог протестировать, т.к. php из консоли не запускается, наверное потому что ставился из рпм, и при установке...
Подумалось чрез запуск lynx это делать..
a la:
# lynx http://www.opsos-site.ry/sms/send.php?[send_arguments]
Но как из него потом выходить? Да и при приёме cookie он запращивает принимать ли их (но я думаю это можно отключить)..
Может кто-нибудь делал что-то подобное, какие будут мысли?
Решил сделать так: по крону запускать php из консоли и вводить туда URL c нужными аргументами:
a la:
# php http://www.opsos-site.ry/sms/send.php?[send_arguments]
Но такой вариант я даже не смог протестировать, т.к. php из консоли не запускается, наверное потому что ставился из рпм, и при установке...
Подумалось чрез запуск lynx это делать..
a la:
# lynx http://www.opsos-site.ry/sms/send.php?[send_arguments]
Но как из него потом выходить? Да и при приёме cookie он запращивает принимать ли их (но я думаю это можно отключить)..
Может кто-нибудь делал что-то подобное, какие будут мысли?
-
glist
- Сообщения: 134
- ОС: Debian Linux
Re: SMS-уведомления
Если мне не изменяет память при отправке sms сообщений с сайта опсоса вас должны попросить ввести символы которые показаны на картинке рядом... не боитесь ли вы что это может помешать 
Debian GNU/Linux, windowmaker, Centericq, Opera/Mozilla/links.
----------------------------------
Sending Kiddies to /dev/null
----------------------------------
Sending Kiddies to /dev/null
-
ch_IP
- Сообщения: 45
- ОС: FreeBSD 6.2-RELEASE
Re: SMS-уведомления
Все предусмотрено.. знаю что пишу 
-
t.t
- Бывший модератор
- Сообщения: 7390
- Статус: думающий о вечном
- ОС: Debian, LMDE
Re: SMS-уведомления
Если проблема только в этом и на сервере линукс (у BSD-шного lynx-а, если я правильно помню, нет такой опции), то можно попробовать lynx -dump(ch_IP @ Dec 13 2005, в 15:08) писал(а):Подумалось чрез запуск lynx это делать..
a la:
# lynx http://www.opsos-site.ry/sms/send.php?[send_arguments]
Но как из него потом выходить?
Перевод с матерного на юниксовый?(ch_IP @ Dec 13 2005, в 16:19) писал(а):Винтовка - это праздник, все летит в /dev/null!
¡иɯʎdʞ ин ʞɐʞ 'ɐнɔɐdʞǝdu qнεиж
-
hudbrog
- Сообщения: 85
Re: SMS-уведомления
А man'ы уже не рулят?
man lynx
....
-accept_all_cookies
accept all cookies.
-dump dumps the formatted output of the default document
or one specified on the command line to standard
output.
Итого получаем:
lynx -accept_all_cookies -dump http://opsos-site.ru/sendsms.php?param=bla-bla
единственный минус - он при этом всем в бекграунд уйдет...
-
TuLiss
- Сообщения: 1611
- Статус: 01100
- ОС: Gentoo,Ubuntu,MacOS X
Re: SMS-уведомления
Хм. А не кто не делал такой метод. Прикрутить аппарат к серверу, и в случии чего он бы отправлял смс? ну и мог при преходящий смс реагировать=) или доку...
Чтение man'нов в слух ещЁ никому не помогало!...
kernel 4.2
chmod -x `which chmod`
War, war never changes...
kernel 4.2
chmod -x `which chmod`
War, war never changes...
-
valeri_ufo
- Бывший модератор
- Сообщения: 274
- Статус: Everywhere, yet nowhere
Re: SMS-уведомления
to ch_IP
Можно было бы и wget -o /dev/null -O /dev/null "http://www.opsos-site.ry/sms/send.php?[send_arguments]"
-------------
http://smstools.meinemullemaus.de/
Можно было бы и wget -o /dev/null -O /dev/null "http://www.opsos-site.ry/sms/send.php?[send_arguments]"
-------------
http://smstools.meinemullemaus.de/
-
ch_IP
- Сообщения: 45
- ОС: FreeBSD 6.2-RELEASE
Re: SMS-уведомления
t.t, ага, чтот типа того.. Просто моя первая подпись сразу вызвала много нареканий у модераторов, и пришлось быстро придумывать новую 
hudbrog, спасибо за совет.. Просто идея про осуществление это через lynx мне пришла недавно, его под рукой пока нет. Получается после выполнения lynx в бэкграунд уйдет? А если его потом убить?..
valeri_ufo, и тебе спасибо за совет.. И за URL тоже)
TuLiss, идея интересная)) Надо тож почитать об этом из интереса..
hudbrog, спасибо за совет.. Просто идея про осуществление это через lynx мне пришла недавно, его под рукой пока нет. Получается после выполнения lynx в бэкграунд уйдет? А если его потом убить?..
valeri_ufo, и тебе спасибо за совет.. И за URL тоже)
TuLiss, идея интересная)) Надо тож почитать об этом из интереса..
-
t.t
- Бывший модератор
- Сообщения: 7390
- Статус: думающий о вечном
- ОС: Debian, LMDE
Re: SMS-уведомления
А чего?.. Прикольно получилось, и смысл не теряется.(ch_IP @ Dec 13 2005, в 20:27) писал(а):t.t, ага, чтот типа того.. Просто моя первая подпись сразу вызвала много нареканий у модераторов, и пришлось быстро придумывать новую
¡иɯʎdʞ ин ʞɐʞ 'ɐнɔɐdʞǝdu qнεиж
-
hudbrog
- Сообщения: 85
Re: SMS-уведомления
он как только отрабатывает - так сразу и дохнет сам. просто он в bg уходит еще до того, как вывести на stdout отренедереную страницу...
-
TuLiss
- Сообщения: 1611
- Статус: 01100
- ОС: Gentoo,Ubuntu,MacOS X
Re: SMS-уведомления
Да я что то пробежался пока пусто. Просто есть пара старых телефонов, можно было бы прекрутить к серванту =)
Чтение man'нов в слух ещЁ никому не помогало!...
kernel 4.2
chmod -x `which chmod`
War, war never changes...
kernel 4.2
chmod -x `which chmod`
War, war never changes...
-
Warderer
- Модератор
- Сообщения: 1056
- Статус: киберпИнгвин на гусеничном ходу
- ОС: Debian unstable
Re: SMS-уведомления
У меня уже работает такая система. Сами написали. Технологии и языки: php-морда для написания, Apache, на котором всё это крутится, MySQL в котором всё лежит, perl и модуль Device::Modem который работает с телефоном.
Читаю вслух с выражением маны - $50/ч + стоимость звонка. Настраиваю сервисы за Вас - $100/ч + стоимость выезда и проживания.
И восемь строк матом...(бесплатно)
И восемь строк матом...(бесплатно)
-
zag
- Сообщения: 102
Re: SMS-уведомления
ch_IP писал(а): ↑13.12.2005 15:08Вот захотел чтобы с сервака мне приходили на телефон sms-уведомления.
Решил сделать так: по крону запускать php из консоли и вводить туда URL c нужными аргументами:
a la:
# php http://www.opsos-site.ry/sms/send.php?[send_arguments]
Но такой вариант я даже не смог протестировать, т.к. php из консоли не запускается, наверное потому что ставился из рпм, и при установке...
Подумалось чрез запуск lynx это делать..
a la:
# lynx http://www.opsos-site.ry/sms/send.php?[send_arguments]
Но как из него потом выходить? Да и при приёме cookie он запращивает принимать ли их (но я думаю это можно отключить)..
Может кто-нибудь делал что-то подобное, какие будут мысли?
А smssend чем не угодил?
-
ch_IP
- Сообщения: 45
- ОС: FreeBSD 6.2-RELEASE
Re: SMS-уведомления
zag, а что есть smssend?.. Просвяти?
-
zag
- Сообщения: 102
Re: SMS-уведомления
Код: Выделить всё
smssend(1) smssend(1)
NAME
smssend - The sms sender (to GSM)
SYNOPSYS
smssend [options] provider [provider-arguments]
-- [SkyUtils-options]
DESCRIPTION
Smssend is an application that can send an SMS (a short message, refering to the Short Message Service) to any GSM, connecting to internet sites using
scripts.
Options
-q Does not display anything when running smssend.
-h or --help
Prints a short description and usage message.
-v or --version
Prints version number, then exits.
-update
Searches for a new version of smssend. Requires an internet connection.
Provider Arguments
-help Must be the first provider argument, if used. Prints needed arguments, their type and description for the specified provider.
-update
Must be the first provider argument, if used. Searches for a new version of the specified provider. Requires an internet connection.
-install
Must be the first provider argument, if used. Searches (and install) if a script for the specified provider exists. Requires an internet connec╜
tion.
- Use - as provider argument if you want this argument to be prompted from command line (stdin).
"" In each provider, there is at least one message string (quoted). You can use the escape character \ to insert any ascii code. For example you can
add a CR/LF to the message (to force a CR on the gsm) with \0A. The escape character always needs 2 numbers representing the ascii code of a char╜
acter in hexadecimal.
Use -help as first provider argument to see what arguments you need for the provider you wish to use. You need to give ALL arguments the provider
needs in order to get it to work, but without the name of the argument. For example, if a provider lame.sms needs the 2 arguments Tel and Message,
you must call : 'smssend lame 123456 "Hi there"' with 123456 as phone number (ie Tel) and "Hi there" as Message.
SkyUtils Options
-p<proxy>:<port>
Smssend supports the use of a proxy (http proxy). If the http_proxy environment variable is set, Smssend will automatically use this variable to
get proxy parameters (See Lynx Users Guide for additional details and examples on how to set this variable). If you don't want to use this vari╜
able, you can use this option and tell Smssend to use the specified proxy on port.
-u<Username>:<Password>
Use this option to specify a Username and Password to use when connecting to the proxy given with the -p option.
-t<Timeout>
Use this option to specify a timeout value (in sec) for the connections (default=60sec).
-d<DebugLevel>
Use this option to set a DebugLevel value (from 0 to 5) for both skyutils and smssend.
-h<User'sHeaderFile>
Use this option to use a User'sHeaderFile instead of the default header for all HTTP requests.
FILES
Provider Files
The needed provider files are installed by default to /usr/local/share/smssend. When invoking smssend with a provider, the program first looks for
the corresponding file in the current directory, then in ~/.smssend/, and finally in the shared directory.
Aliases File
When invoking SmsSend with arguments, you have the possibility to use aliases (@Alias_name), which are located in the file ~/.smssend/aliases. Each
line of this file (except for empty lines, and lines starting with a '#') must be as following : 'Name Alias' (without the '), where Name and Alias
being separated by at least one space.
Example :
smssend totalise.sms @MyCountryCode @Sophie "Hi Sophie"
Profiles File
When invoking SmsSend with arguments, you have the possibility to use profiles (@Profile_name), which
are located in the file ~/.smssend/profiles. Each line of this file (except for empty lines, and lines starting with
a '#') must be as following : 'Name Profile' (without the '), where Name and Profile being separated by at least one space,
and Profile being a space separated list of arguments to be inserted in the command line at the location of the use of the profile.
Example : (One line of the profiles file being 'totalise totalise.sms +33')
smssend %totalise @Sophie "Hi Sophie"
EXAMPLE
Here comes an example on how to use smssend with the script totalise.sms : This script requires 3 parameters (CountryCode, Tel and Message). Here is how
you must call smssend if you wish to send the message "hi from smssend" to the french recipient 06123456 : smssend totalise.sms 33 6123456 "hi from smssend"
BUGS AND NOTES
Well... there MIGHT be bugs in the program. But it is sure that the provider scripts may not work, or may stop to work if provider's site changes. In this
case, just send an email to the author of the script (his name at the begining of the script file), telling him which script doesn't work, and hoping
he'll update the script as soon as possible (then you will be able to get the latest version of the script with the command smssend <provider> -update.)
SEE ALSO
smssend.scripting(1)
COPYRIGHTS
Copyright (c) 2000'03 - Christophe "Ze KiLleR" Calmejane <zekiller@-REMOVE-skytech.org>
Distributed under GNU General Public License v2; see COPYING file for more informations.
AUTHORS
Christophe "Ze KiLleR" Calmejane <zekiller@-REMOVE-skytech.org>
Version 3.4 february 12th 2003 smssend(1)http://www.linuxforum.ru/index.php?showtopic=8001&st=15
-
TuLiss
- Сообщения: 1611
- Статус: 01100
- ОС: Gentoo,Ubuntu,MacOS X
Re: SMS-уведомления
ну и как с мегафоном smssend работает? +)
Чтение man'нов в слух ещЁ никому не помогало!...
kernel 4.2
chmod -x `which chmod`
War, war never changes...
kernel 4.2
chmod -x `which chmod`
War, war never changes...