Skip to content

Instantly share code, notes, and snippets.

hakre hakre

Block or report user

Report or block hakre

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View README.md

Extend from SoapClient Examples

Just a collection gist of some assorted example SOAPClients. Code must not be stable or useful under all circumstances, these are examples. Most of the code is outdated, so you won't need to use it any longer in production code. I've just collected and compiled this together out of interest, the information normally is scattered around.

If you need to a start with PHP's SOAPClient start with the PHP manual page of it and read through the comments as well. Double check with exisiting bug-reports if given as many things are fixed since a comment was left.

@hakre
hakre / phpinfo-search.html
Created May 14, 2019
phpinfo() javascript search
View phpinfo-search.html
<!-- phpinfo() search -->
<form style="position: sticky; top: 0;">
<input>
</form>
<script defer>//
/*
* phpinfo() search javascript (~ES5/6)
*/
const w = window;
const d = document;
@hakre
hakre / dl-file.php
Created Jan 2, 2012
Wordpress login to download uploaded files
View dl-file.php
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
@hakre
hakre / iconv-l.txt
Created Dec 2, 2012
Iconv List of Encodings
View iconv-l.txt
ANSI_X3.4-1968 ANSI_X3.4-1986 ASCII CP367 IBM367 ISO-IR-6 ISO646-US ISO_646.IRV:1991 US US-ASCII CSASCII
UTF-8
ISO-10646-UCS-2 UCS-2 CSUNICODE
UCS-2BE UNICODE-1-1 UNICODEBIG CSUNICODE11
UCS-2LE UNICODELITTLE
ISO-10646-UCS-4 UCS-4 CSUCS4
UCS-4BE
UCS-4LE
UTF-16
UTF-16BE
@hakre
hakre / iteration-and-recursive-iteration.php
Created Sep 2, 2012
Iteration and Recursive Iteration Examples Code
View iteration-and-recursive-iteration.php
<?php
/*
* Iteration and Recursive Iteration Examples Code
*
* @link http://stackoverflow.com/questions/12077177/how-does-recursiveiteratoriterator-works-in-php
* @author hakre <http://hakre.wordpress.com>
*/
### To have these examples to work, a directory with subdirectories is needed,
### I named mine "tree":
@hakre
hakre / README.md
Last active Apr 12, 2019
Iterators for PHP XMLReader for ease of parsing
View README.md

Iterators for PHP XMLReader for ease of parsing

Change Log:

  • 0.1.10 maintenance release with fixes.

  • 0.1.9 maintenance release with fixes. added XMLReaderNode::expand().

  • 0.1.8 maintenance release with fixes.

@hakre
hakre / example.php
Created Jul 14, 2015
Register Xpath Namespace-Prefixes globally on a SimpleXML Document
View example.php
<?php
/**
* @link http://stackoverflow.com/questions/28520983/php-simplexml-xpath-does-not-keep-the-namespaces-when-returns-data
*/
/**
* Class SimpleXpath
*
* DOMXpath wrapper for SimpleXMLElement
*
@hakre
hakre / XmlArrayElement.php
Created Jul 14, 2015
Recursive Method Calls with SimpleXML and DOMDocument Context
View XmlArrayElement.php
<?php
/**
* Class ArrayXmlElement
*
* Use an array definition stored as XML to convert a tree structure from another DOMDocument
*
* @author hakre <http://hakre.wordpress.com>
*/
class XmlArrayElement extends SimpleXMLElement
{
@hakre
hakre / imap-attachment.php
Created Apr 11, 2012
Save attachments from imap messages to disk.
View imap-attachment.php
<?php
/**
* imap-attachment.php
*
* @author hakre <hakre.wordpress.com>
* @link http://stackoverflow.com/questions/9974334/how-to-download-mails-attachment-to-a-specific-folder-using-imap-and-php
*/
/**
* Utility Class
@hakre
hakre / output-buffer-to-temp.php
Created Dec 19, 2012
Output buffer for large output to temporary file on disk (>2MB)
View output-buffer-to-temp.php
<?php
/*
* Output buffer for large output to temporary file on disk (>2MB)
*
* @link http://stackoverflow.com/questions/5446647/how-can-i-use-var-dump-output-buffering-without-memory-errors/
*/
/**
* Iterate over lines of a stream resource.
*
You can’t perform that action at this time.