Skip to content

Instantly share code, notes, and snippets.

@veedeoo
veedeoo / FormHelper.php
Last active November 5, 2016 07:50
Form Helper
<?php
/**
* FormHelper
*
* @package veedeoo HMVC
* @author @Veedeoo and @Geegler
* @copyright 2014
* @version 2.1.0
* @access public
@veedeoo
veedeoo / ajax-form.js
Last active August 29, 2015 14:05 — forked from havvg/ajax-form.js
jQuery(function($) {
$('form[data-async]').on('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
<?php
file_put_contents( 'progress.txt', '' );
$targetFile = fopen( 'testfile.iso', 'w' );
$ch = curl_init( 'http://ftp.free.org/mirrors/releases.ubuntu-fr.org/11.04/ubuntu-11.04-desktop-i386-fr.iso' );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt( $ch, CURLOPT_NOPROGRESS, false );
curl_setopt( $ch, CURLOPT_PROGRESSFUNCTION, 'progressCallback' );
curl_setopt( $ch, CURLOPT_FILE, $targetFile );
<?php
namespace Treffynnon;
/**
* A PHP class to access a PHP array via dot notation
* (Agavi http://www.agavi.org was the inspiration).
*
* This was hacked in to an existing codebase hence the
* global config array variable.
@veedeoo
veedeoo / Excel.php
Last active December 19, 2015 19:49 — forked from ihumanable/Excel.php
<?php
/**
* Simple excel writer class with no external dependencies, drop it in and have fun
* @author Matt Nowack
* @license Unlicensed
* @version 1.0
* Edits: Veedeoo 2013
*/
class Excel {