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 / magnet-links-bittorrent.php
Created Mar 1, 2012
Magnet links library for PHP
View magnet-links-bittorrent.php
@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+
View change-admin-url.php
<?php
/**
* Change Admin URL
*
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
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 / 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
{
You can’t perform that action at this time.