Skip to content

Instantly share code, notes, and snippets.

@jonkerw85
jonkerw85 / xml_toolkit_http.txt
Last active October 7, 2022 10:17
IBMi XML Toolkit over HTTP
<?php
// $url = "http://common1.frankeni.com:58700/cgi-bin/xmlcgi.pgm";
$uid = '';
$pwd = '';
$url = 'http://10.230.18.10/cgi-bin/xmlcgi.pgm';
$ixml = "<?xml version='1.0' encoding='UTF-8' ?>\n";
@jonkerw85
jonkerw85 / pdo_odbc_ibmi_db2
Last active October 7, 2022 10:19
PHP PDO ODBC for IBMi AS/400 DB2
<?php
$UID = '';
$PWD = '';
$dsn = "odbc:Driver={IBM i Access ODBC Driver 64-bit};SYSTEM={IP_ADDRESS};PORT=50000;UID=$UID;PWD=$PWD;";
$pdo = new \PDO($dsn);
$sql = 'SELECT * FROM XXXX LIMIT 10';
foreach ($pdo->query($sql) as $row) {
print_r($row);
@jonkerw85
jonkerw85 / Pdo.php
Last active July 19, 2023 15:20
PDO_ODBC DB2 Adapter for Zend Framework 1 & zf1-future
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL: