WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Php Input Output Library - access the parallel and serial(rs232) port directly.
Categories : PHP, Hardware, PHP Classes Click here to Update Your Picture
Kevin Pageau
Date : Mar 02nd 2006
Grade : 2 of 5 (graded 3 times)
Viewed : 11466
File : 4347.zip
Images : No Images for this code example.
Search : More code by Kevin Pageau
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

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