Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2976 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  Modifier un script java-script en PhP / MySQL

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Modifier un script java-script en PhP / MySQL

n°1977143
xunil2003
Posté le 25-03-2010 à 11:03:54  profilanswer
 

Bonjour,
 
Je voudrai savoir si il est possible de mettre ce script en php afin d'inscrire les données qui en résulte dans une table Mysql.
 
Merci.
 
 

Code :
  1. <html>
  2. <head>
  3. <!--//
  4. This page loads the ActiveHome Pro scripting object and
  5. uses the RecvAction to populate a string that is displayed
  6. in the TextArea in the middle of the page. It also can be
  7. used to pop op the PalmPad sample application for sending
  8. commands throught the ActiveHome Scripting Interface.
  9. The script for loading the object is at the end of the page.
  10. //-->
  11. <script type="text/javascript" language="javascript">
  12. <!--//
  13. //Create the Popup window for the PalmPad App
  14. function lPalmPad() {
  15. window.open("./X10/palmpad/palmpad.html","PalmPad","width=280,height=450,status=1" );
  16. }
  17. //-->
  18. </script>
  19. </head>
  20. <body>
  21. <form name="myForm">
  22. <center>
  23. <table><tr><td>
  24. <input type="button" value="Launch PalmPad" onClick="lPalmPad();"><BR>
  25. <!--//
  26. This is the area where the text is displayed. When the CM15A recieves data.
  27. //-->
  28. <textarea NAME="text1" rows="24" cols="80" style="background-color:#000000;color:#FFFFFF;"></textarea><BR>
  29. </form>
  30. </td></tr>
  31. </table>
  32. </center>
  33. <p>
  34. <!--//
  35. Load the ActiveHome Scripting Object. Since the CLSID is correct, the codebase doesn't need a full path for the dll
  36. //-->
  37. <OBJECT ID="ActiveHomeObj" width=0 height=0 classid="CLSID:001000AF-2DEF-0208-10B6-DC5BA692C858" codebase="ahscript.dll" standby="Loading X10 net components..." type="application/x-oleobject">
  38. </OBJECT>
  39. <!--//
  40. Read incoming events as they come in using the RecvAction function, parameters as follows:
  41. commandString = type of command coming in: "recplc" is a powerline signal; "recvrf" is a radio-frequency signal
  42. param1 = the address of the received command, "a1" to "p16"
  43. param2 = the command received: a string -- see help documentation for complete reference of PLC and RF commands
  44. param3 = first string of additional data: dim level for a PLC dim, PLC extended code command data, or the KeyUp/KeyDown/Sequence data for an RF command (see the help for more information)
  45. param4 = second additional data string: if PLC, data for an extended command; for RF commands, the timestamp of the command
  46. param5 = unused for now
  47. param6 = unused for now
  48. //-->
  49. <!--//
  50. Here we build a string out of the received parameters and assign the value of our text area to the new string. This is updated automatically as new commands come in.
  51. //-->
  52. <SCRIPT FOR="ActiveHomeObj" EVENT="RecvAction( commandString, param1, param2, param3, param4, param5, param6)" LANGUAGE="Jscript">
  53. myForm.text1.value = commandString+" "+param1+" "+param2+" "+param3+" "+param4+" "+param5+"\n"+myForm.text1.value;
  54. </SCRIPT>

mood
Publicité
Posté le 25-03-2010 à 11:03:54  profilanswer
 

n°1977151
rufo
Pas me confondre avec Lycos!
Posté le 25-03-2010 à 11:14:54  profilanswer
 

C'est pas que du javascript, manifestement, l'objet ActiveHomeObj est une dll, faudrait donc savoir ce qu'elle fait. Là, le code que tu nous donnes est assez obscure :/


---------------
Astres, outil de help-desk GPL : http://sourceforge.net/projects/astres, ICARE, gestion de conf : http://sourceforge.net/projects/icare, Outil Planeta Calandreta : https://framalibre.org/content/planeta-calandreta
n°1977174
xunil2003
Posté le 25-03-2010 à 11:30:04  profilanswer
 

Effectivement  il y a le fichier ahscript.dll, ce script permet de dire (afficher) les ordres reçus domotique x10 (commande exécute ordre: exp : A5,C16,etc..) le but est de mettre en php le fameux script afin d'écrire les ordres reçus dans une table Mysql qui permettra d'envoyer des emails, sms,  etc selon les ordre domotique reçus et de faire des statistique de  consommation de courant, etc...  
 
ActiveHomeObj doit est un activeX norme microsof.
 
Merci.

n°1977236
rufo
Pas me confondre avec Lycos!
Posté le 25-03-2010 à 13:01:02  profilanswer
 

A mon avis, si t'as pas accès au code source de la DLL (très probable si c'est un produit propriétaire), je pense que c'est mort. Regardes si y'a pas une interface COM ou une API disponible : dans ce cas, ça serait jouable avec PHP (ça suppose que le serveur soit forcément sous Windows du coup), sinon, je pense que c'est mort :/


---------------
Astres, outil de help-desk GPL : http://sourceforge.net/projects/astres, ICARE, gestion de conf : http://sourceforge.net/projects/icare, Outil Planeta Calandreta : https://framalibre.org/content/planeta-calandreta
n°1977275
xunil2003
Posté le 25-03-2010 à 14:23:17  profilanswer
 

Le DLL est un produit propriétaire, oui il est 100% compatible API, mais je ne connais pas l'api en particulier.
 
Merci.
 

n°1977279
rufo
Pas me confondre avec Lycos!
Posté le 25-03-2010 à 14:28:56  profilanswer
 

Ben va falloir connaître l'API alors, pas d'autre choix aux vues des infos que tu nous as données.


Message édité par rufo le 25-03-2010 à 14:29:05

---------------
Astres, outil de help-desk GPL : http://sourceforge.net/projects/astres, ICARE, gestion de conf : http://sourceforge.net/projects/icare, Outil Planeta Calandreta : https://framalibre.org/content/planeta-calandreta

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  Modifier un script java-script en PhP / MySQL

 

Sujets relatifs
[PHP]lister les bases mysql...PHP, Excel et ODBC
php/mysql résultat requête dans une seule variable[MYSQL] procédure stockée, connection à une autre BD
Comparaison entre 2 dates/algorithme PHPMenu /PHP Lien avec MySQL
URI encode java[PHP] Cookies : une partie disparait inexplicablement -> Plante Apache
Plus de sujets relatifs à : Modifier un script java-script en PhP / MySQL


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR