This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// String obtida | |
$macAddress = '10.19.60.72 --- 0x3 Endereço IP Endereço físico Tipo 10.19.63.117 70-85-c2-f6-28-f8 dinâmico'; | |
// Expressão regular pra extrair o MAC ADDRESS | |
preg_match_all('/[a-fA-F0-9-]{17}|[a-fA-F0-9]{12}$/', $macAddress, $mac); | |
// Printa o resultado | |
print_r($mac); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
file_put_contents( 'progress.txt', '' ); | |
$targetFile = fopen( 'testfile.iso', 'w' ); | |
$ch = curl_init( 'http://ftp.free.org/mirrors/releases.ubuntu-fr.org/11.04/ubuntu-11.04-desktop-i386-fr.iso' ); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt( $ch, CURLOPT_NOPROGRESS, false ); | |
curl_setopt( $ch, CURLOPT_PROGRESSFUNCTION, 'progressCallback' ); | |
curl_setopt( $ch, CURLOPT_FILE, $targetFile ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// @source: http://www.paulund.co.uk/resize-image-class-php | |
/** | |
* Resize image class will allow you to resize an image | |
* | |
* Can resize to exact size | |
* Max width size while keep aspect ratio | |
* Max height size while keep aspect ratio | |
* Automatic while keep aspect ratio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Simple MySQLi Class 0.3 | |
* | |
* @author JReam | |
* @license GNU General Public License 3 (http://www.gnu.org/licenses/) | |
* | |
* This program is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU General Public License as published by the | |
* Free Software Foundation; either version 3 of the License, or |
NewerOlder