Autor |
Nachricht |
fredri
Anmeldedatum: 01.10.2007
Beiträge: 7
|
Verfasst am:
Do Nov 08, 2007 03:03 |
  |
I Wanted to be able to send messages via an webpage so I made an very simple web page that is able to control My Phone Explorer via internet.
What you need in an windows comouter and a webserver that support php.
I used Windows XP pro and IIS + PHP (www.php.net)
index.html
Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form action="save.php" method="post">
<textarea name="tele"></textarea>
<textarea name="medelande"></textarea>
<br />
<input type="submit" value="Save">
</form>
</body>
</html>
|
save.php
Code: | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SMS sender</title>
</head>
<body>
<p>
<?php
$fixed = 'C:\"Program Files"\MyPhoneExplorer\MyPhoneExplorer.exe action=sendmessage savetosent=1 number=';
$fixed2 = "text=";
$tele = $_POST['tele'];
$medelande = $_POST['medelande'];
$file = "file.bat";
$Saved_File = fopen($file, 'w');
fwrite($Saved_File, $fixed);
fwrite($Saved_File, $tele);
fwrite($Saved_File, " ");
fwrite($Saved_File, $fixed2);
fwrite($Saved_File, '"' );
fwrite($Saved_File, $medelande);
fwrite($Saved_File, '"' );
fclose($Saved_File);
exec('C:\Inetpub\wwwroot\20\file.bat');
?>
</p>
</body>
</html>
|
This is an very simple prof of concept, and can be done in a better way. Using a .bat file is not ideal (i two people try to send an sms at the same time it will go badly.) Also using a myriad of variables is most likely not the best way to do it.
I will try to make this better later.
To be able to use this all you need to change is tha path to the .exe file in this line
Code: | $fixed = 'C:\"Program Files"\MyPhoneExplorer\MyPhoneExplorer.exe action=sendmessage savetosent=1 number='; |
and the path to the .bat file. |
|
|
  |
 |
FJ
Site Admin
Anmeldedatum: 15.02.2006
Beiträge: 31906
Wohnort: Tirol
|
Verfasst am:
Do Nov 08, 2007 08:10 |
  |
You could do it also via SendMessage - then you'll get a response if MyPhoneExplorer is currently working. You have to send a WM_COPYDATA-Message to MyPhoneExplorer. i don't know if you are able to do this. I don't think it can be done via patch, you would have to write a library (ActiveX) or exe |
|
|
    |
 |
EvylRat
Anmeldedatum: 14.01.2008
Beiträge: 3
|
Verfasst am:
Mo Jan 14, 2008 18:46 |
  |
This script looks interesting. If I had a webserver running at home, I wonder how I'd be able to trigger txt messaging from my website.
Scenario, my website is a small commuinity of like minding folk who meet up regularly, some of which do not have access to a PC. I have 1000s of free texts to use on my phone. I'd like to use this as some kind of Maillist, except with mobile numbers, so I can txt a bunch of folk off the website. I use MyPhoneExplorer via bluetooth, so since I am usually in the house, my webserver should find my phone.
but like you said, there needs to be some kind of error checking. |
|
|
   |
 |
|
|
Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
Powered by phpBB
© 2001, 2002 phpBB Group :: FI Theme ::
Alle Zeiten sind GMT + 1 Stunde
Deutsche Übersetzung von phpBB.de
| |