Skip to content

Instantly share code, notes, and snippets.

View neo22s's full-sized avatar

Chema neo22s

View GitHub Profile
<?php
/*
EmailAddressValidator Class
http://code.google.com/p/php-email-address-validation/
Released under New BSD license
http://www.opensource.org/licenses/bsd-license.php
@neo22s
neo22s / update220.php
Last active August 29, 2015 14:04
update open classifieds to 2.2.0
<?php
/**
* HTML template for the install
*
* @package Install
* @category Helper
* @author Chema <[email protected]>
* @copyright (c) 2009-2014 Open Classifieds Team
* @license GPL v3
*/
@neo22s
neo22s / update16.php
Last active August 29, 2015 14:04
update open eshop to 1.6
<?php
/**
* HTML template for the install
*
* @package Install
* @category Helper
* @author Chema <[email protected]>
* @copyright (c) 2009-2014 Open Classifieds Team
* @license GPL v3
*/
@neo22s
neo22s / install.php
Created August 8, 2014 10:38
install 2.2.0
<?php
/**
* HTML template for the install
*
* @package Install
* @category Helper
* @author Chema <[email protected]>
* @copyright (c) 2009-2014 Open Classifieds Team
* @license GPL v3
*/
@neo22s
neo22s / update221.php
Created September 17, 2014 08:23
Update OC to 2.2.1
<?php
/**
* HTML template for the install
*
* @package Install
* @category Helper
* @author Chema <[email protected]>
* @copyright (c) 2009-2014 Open Classifieds Team
* @license GPL v3
*/
@neo22s
neo22s / validate.php
Last active October 18, 2020 02:25
validate domain name in PHP
<?
/**
* checks if a domain name is valid
* @param string $domain_name
* @return bool
*/
public static function domain_name($domain_name)
{
//FILTER_VALIDATE_URL checks length but..why not? so we dont move forward with more expensive operations
$domain_len = strlen($domain_name);
@neo22s
neo22s / config.conf
Created December 11, 2014 21:57
nginx config for Open Classifieds
server {
listen 80;
listen [::]:80;
server_name
yourdomain.com
;
root /var/www/openclassifieds;
proxy_set_header Host $host;
@neo22s
neo22s / update230.php
Last active August 29, 2015 14:11
update 2.3.0
<?php
/**
* HTML template for the install
*
* @package Install
* @category Helper
* @author Chema <[email protected]>
* @copyright (c) 2009-2014 Open Classifieds Team
* @license GPL v3
@neo22s
neo22s / csvarray.php
Last active August 29, 2015 14:16
CSV to Array
/**
* CSV file to array
* @param file $csv
* @param array $expected_header
* @param boolean $convert_object you want it returned as an object?
* @param string $delimiter
* @param string $enclosure
* @return array
*/
public function csv_to_array($csv,$expected_header=NULL,$convert_object = FALSE, $delimiter = "," , $enclosure = '"')
@neo22s
neo22s / update231.php
Created March 30, 2015 08:02
update to 2.3.1 from 2.1.8 for vince
<?php
/**
* HTML template for the install
*
* @package Install
* @category Helper
* @author Chema <[email protected]>
* @copyright (c) 2009-2014 Open Classifieds Team
* @license GPL v3