|
|
This extension allows the direct access the parallel and serial(rs232) port in reading and writing by the DLL inpout32.dll under WIN9x/NT/2000/XP for any assembly. An example of concret application? Complete house automation with Web interface and php, connection hardware of any nature with the ports like assemblies simple or to complicate. One idea simple but quite practical... Extension and source was compiled with Delphi 6, sources and example included.
Note : Last version always on http://www.phpcs.com/code.aspx?ID=36224
Functions :
int iol_input(integer pattern)
boolean iol_output(integer pattern, integer pattern)
string iol_info()
iol_input(port)
iol_output(port, value)
iol_info()
Exemple :
File iol_ouput.php,
| <?php
require_once("class/php_iol.class.php");
$DemoPhpIOL = new php_iol();
for($i=0; $i<255; $i++) {
$DemoPhpIOL->WriteIOOutput(888, $i); // 888dec of 378hex
usleep(1550);
}
echo "Output port 888(378h) value 0 : ";
if($DemoPhpIOL->WriteIOOutput(888, 0)) {echo "Ok";}else{echo "Error";}
?> | |
File iol_input.php,
| <?php
require_once("class/php_iol.class.php");
$DemoPhpIOL = new php_iol();
$RcvByte = $DemoPhpIOL->GetIOInput(889); // Base(378h) + 1 = 889
echo "<b>Input value : ".$rcv."</b><br>";
if($RcvByte > 127) {
$RcvByte = $RcvByte -128;
echo "Busy : true<br>";
}else{
echo "Busy : false<br>";
}
if($RcvByte > 63) {
$RcvByte = $RcvByte -64;
echo "Ack : true<br>";
}else{
echo "Ack : false<br>";
}
if($RcvByte > 31) {
$RcvByte = $RcvByte -32;
echo "Pe : true<br>";
}else{
echo "Pe : false<br>";
}
if($RcvByte > 15) {
$RcvByte = $RcvByte -16;
echo "Select : true<br>";
}else{
echo "Select : false<br>";
}
if($RcvByte > 7) {
$RcvByte = $RcvByte -8;
echo "Error : true<br>";
}else{
echo "Error : false<br>";
}
?> | | |
|
| Inline Scope Control - The inline class provides methods for creating and destroying local variable scopes. Simply put, local scopes are spaces where some or all of the global variables are temporarily hidden. Categories : PHP, PHP Classes, Variables | | | These PHP Classes Check if a host is alive using various methods. Categories : PHP, PHP Classes, Sockets, CURL | | | Linkers Class Categories : PHP Classes, PHP | | | Db_lib - practical example usage of database abstraction and form validation.
Categories : PHP, Form Processing, PHP Classes, Data Validation, Beginner Guides | | | Directory Listing To XML : Outputs XML File of a Given Directory Listing Categories : PHP, PHP Classes, XML, Directories | | | MySQL Handler Categories : PHP, Databases, MySQL, Classes and Objects, PHP Classes | | | pcCalendar class - Allows for the creation of calendars in HTML pages. All output functions can be easily overridden, refer to article 1471 for an example.
Categories : PHP, Date Time, Calendar, PHP Classes | | | Access_user Class - an easy to use system for protecting pages and register users. Categories : PHP, Classes and Objects, Object Oriented, PHP Classes, Authentication | | | [PHP5] PHP Debugger and Helper Categories : PHP, PHP Classes, Errors and Logging, Debugging, XML | | | PHP4 DirectoryIterator Class Categories : PHP, PHP Classes, Filesystem, Directories | | | EasyPhpThumbnail Class - The EasyPhpThumbnail class allows you to generate thumbnails and handle image manipulation for GIF, JPG and PNG on-the-fly. Categories : PHP, PHP Classes, Object Oriented, Graphics, GD image library | | | Power Form Validation Categories : PHP, PHP Classes, Data Validation | | | Simple Mini Poll class library (SimPoll) Categories : PHP, PHP Classes, Databases, MySQL, Complete Programs | | | Powerful php/mysql Pagination for up to 6 URL Params Categories : PHP, PHP Classes, Databases, MySQL, Navigation | | | .htpassword manager for apache Categories : PHP, PHP Classes, Authentication, Apache | |
| |
| |
|