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
@hakre
hakre / docker-minimal-example.sh
Created Oct 23, 2019
Docker Run without "docker run"
View docker-minimal-example.sh
<<'EOD' docker build --rm --tag rewrite-tester --no-cache -
FROM httpd:alpine
RUN set -e \
; sed -i -e 's/^#LoadModule rewrite_module/LoadModule rewrite_module/' \
-e 's/^LogLevel .*$/LogLevel debug rewrite:trace8/' \
-e '\|<Directory "/usr/local/apache2/htdocs">|,\ </Directory> s/^ AllowOverride .*$/ AllowOverride All/' \
/usr/local/apache2/conf/httpd.conf \
; echo -e ' \n\
RewriteEngine On \n\
RewriteBase / \n\
@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 / other.php
Created Jun 18, 2017
inject php declare ticks poc
View other.php
<?php
/**
* just some file
*/
$a = 1;
if ($a > 0) {
$a += 2;
print($a);
@hakre
hakre / csv-to-xml.php
Created Aug 16, 2015
Converting a massive CSV to a specific XML format
View csv-to-xml.php
<?php
/*
* Converting a massive CSV to a specific XML format
*
* @link http://stackoverflow.com/a/32034227/367456
*/
/**
* Class XmlEncoder
*
View repl.bat
@if (@X)==(@Y) @end /* Harmless hybrid line that begins a JScript comment
::************ Documentation ***********
::REPL.BAT version 5.0
:::
:::REPL Search Replace [Options [SourceVar]]
:::REPL /?[REGEX|REPLACE]
:::REPL /V
:::
::: Performs a global regular expression search and replace operation on
View 3v4l.org_fttGI.php
<?php
/**
* Example: SimpleXML tell apart a single element and a list of elements with a single element
*
* @link https://hakre.wordpress.com/2013/02/12/simplexml-type-cheatsheet/
* @libk http://stackoverflow.com/a/14829309/367456
*/
$buffer = <<<XML
<root>
@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 / domblaze2.php
Created Jul 14, 2015
DOMBLAZE II XMLNS
View domblaze2.php
<?php
/**
* DOMBLAZE II is just with XMLNS support
*
* @link http://stackoverflow.com/a/26327033/367456
*/
/* DOMBLAZE II XMLNS */ $doc->registerNodeClass("DOMElement", "DOMBLAZE");
class DOMBLAZE extends DOMElement
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.

You can’t perform that action at this time.