Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    [Porta seriale]leggere gli sms del cellulare

    Ciao a tutti,
    so che chiederò una cosa complessa, ma vediamo se almeno trovo qualche documentazione...vorrei riuscire a creare una piccola applicazione in php che mi legga gli sms del cellulare in modo tale da aggiornare il sito internet da remoto.

    Come faccio a comunicare con la porta seriale?

    se qualcuno sà di qualche sito che ne parla o esistono già programmi preparati, tutto viene ben accetto.

    Grazie.

  2. #2
    il pc e' linux o winzozz?
    Kaworu.it
    Bookmarks on line i tuoi preferiti ovunque
    il tempo è il miglior dottore.....solo che è parecchio lento ...troppo lento
    wxKonTEXT Editor di testi(linux, win e mac), new version

  3. #3

  4. #4
    nel manuale php ho trovato questo...

    codice:
    <?php
    // HOW TO USE PHP TO WRITE TO YOUR SERIAL PORT: TWO METHODS
    $serproxy=true;
    if ($serproxy) {
    // Use this code in conjunction with SERPROXY.EXE 
    // (<http://www.lspace.nildram.co.uk/freeware.html>)
    // which converts a Serial stream to a TCP/IP stream
    $fp = fsockopen ("localhost", 5331, $errno, $errstr, 30);
    if (!$fp) {
    echo "$errstr ($errno)";
    } else {
    $e = chr(27);
    $string = $e . "A" . $e . "H300";
    $string .= $e . "V100" . $e . "XL1SATO";
    $string .= $e . "Q1" . $e . "Z";
    echo $string;
    fputs ($fp, $string );
    fclose ($fp);
    }
    } elseif ($com1) {
    // Use this code to write directly to the COM1 serial port
    // First, you want to set the mode of the port. You need to set
    // it only once; it will remain the same until you reboot.
    // Note: the backticks on the following line will execute the 
    // DOS 'mode' command from within PHP
    `mode com1: BAUD=9600 PARITY=N data=8 stop=1 xon=off`;
    $fp = fopen ("COM1:", "w+");
    if (!$fp) {
    echo "Uh-oh. Port not opened.";
    } else {
    $e = chr(27);
    $string = $e . "A" . $e . "H300";
    $string .= $e . "V100" . $e . "XL1SATO";
    $string .= $e . "Q1" . $e . "Z";
    echo $string;
    fputs ($fp, $string );
    fclose ($fp);
    }
    }
    ?>

  5. #5
    nessuno ha mai provato a leggere dati da una seriale?

  6. #6
    proprio nessuno?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.