Jump to content


Gustavo el Geranie

Member Since 16 Apr 2003
Offline Last Active Nov 15 2011 04:01 PM
-----

Posts I've Made

In Topic: Connect to USB Modem via PHP

27 September 2011 - 12:15 PM

Sorry, I cannot help you there. DIO is a pecl module: http://pecl.php.net/package/dio
But I do not know how to install them on XAMPP. Maybe you find some info on the pecl or the xampp site?

In Topic: Connect to USB Modem via PHP

27 September 2011 - 11:16 AM

Quote

"/dev/tty.ZTEUSBATPort_" is a linux spesific target.
True. But I still have the impression that the dio extension is missing on windows.

@Dr-SeMSeM: Can you give us the error message? Is it stream wrapper missing or file not found?

In Topic: Connect to USB Modem via PHP

27 September 2011 - 10:55 AM

AFAIK this has nothing to do with unix/windows.
Do you have the DIO extension enabled on windows?

In Topic: Random strings into an array?

07 September 2011 - 06:28 PM

<?php
$length = 6; // length of each code
$number = 1000; // number of codes
$sitename = "mysite"; // this works as a salt for the codes, you can choose any string
$codes = array();

for ($i = 0; $i < $number; $i++){
    $codes[] = substr(md5($sitename . $i), 0, $length);
}
print_r($codes);
?>