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 | |
| error_reporting(E_ALL); | |
| /* Get the port for the service. */ | |
| $port = "9100"; | |
| /* Get the IP address for the target host. */ | |
| $host = "172.17.144.89"; | |
| /* construct the label */ |
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 | |
| /* | |
| FROM https://jonlabelle.com/snippets/view/php/check-ldap-group-membership-in-php | |
| */ | |
| $user = 'bob'; | |
| $password = 'zhlob'; | |
| $host = 'myldap'; | |
| $domain = 'mydomain.ex'; |
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
| #!/usr/bin/php | |
| <?php | |
| # Parse options | |
| $opts = getopt('h:n:u:p:b:s:', array( 'help' )); | |
| if (isset($opts['help']) && $opts['help']) { | |
| echo <<<ENDHELP | |
| Usage: | |
| $argv[0] [-h HOSTNAME] [-n PORTNUM] [-u USERNAME] [-p PASSWORD] [-b BASEDN] [-s SEARCH] |
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 | |
| //CustomersModel.php | |
| use GroceryCrud\Core\Model; | |
| use GroceryCrud\Core\Model\ModelFieldType; | |
| class CustomersModel extends Model { | |
| protected $ci; | |
| protected $db; |
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 | |
| $xml = simplexml_load_file('test.xml'); | |
| $ns = $xml->getNamespaces(true); | |
| $xml->registerXPathNamespace('c', $ns['cfdi']); | |
| $xml->registerXPathNamespace('t', $ns['tfd']); | |
| //EMPIEZO A LEER LA INFORMACION DEL CFDI E IMPRIMIRLA | |
| foreach ($xml->xpath('//cfdi:Comprobante') as $cfdiComprobante){ | |
| echo $cfdiComprobante['version']; |