|
|
|
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>";
}
?> | | |
|
| file class , uploade file , download file already uploaded on another website Categories : PHP, PHP Classes, Filesystem, Web Services | | | PHP Paypal IPN Integration Class v1.0.0 Categories : PHP, PHP Classes, Payment Gateways | | | crop and resize image class using gd library function Categories : PHP, PHP Classes, GD image library, Graphics | | | A Timing Class Categories : PHP, PHP Classes, Date Time | | | The class to check load time of your script
VERY usefull for relatively slow applications, but not only.. Categories : PHP, PHP Classes, Debugging | | | Create HTML forms dynamicly using Javascript & PHP Categories : PHP, PHP Classes, Java Script | | | usercounter class Categories : PHP, PHP Classes, Databases, MySQL, Environment Variables | | | RSS parser.
Parses RSS into an array. Quick and nasty but does the job.
No checking is done for correct Tags, only correct XML.
PHP4 needed to display result (uses print_r). Categories : PHP, XML, PHP Classes, Rich Site Summary (RSS) | | | Password Creator: This PHP code exmaple shows how to use bitwise operations on a single variable and using it as a flagged variable. The class generates passwords of a given length using specified characters and the flags. Categories : PHP, PHP Classes, Algorithms, Security | | | an example of the cyberlib payment class Categories : PHP, PHP Classes, Ecommerce, Credit Cards | | | Power Form Validation Categories : PHP, PHP Classes, Data Validation | | | 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 | | | Class for sending mail with MIME attachments in multipart format using external sendmail, mimencode and zip Categories : Email, Network, PHP, PHP Classes | | | Powerful php/mysql Pagination for up to 6 URL Params Categories : PHP, PHP Classes, Databases, MySQL, Navigation | |
|
|
|