This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Front end controller for OC app | |
* | |
* @package OC | |
* @category Controller | |
* @author Chema <[email protected]> | |
* @copyright (c) 2009-2013 Open Classifieds Team | |
* @license GPL v3 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
* Example how to use it in PHPMailer | |
*/ | |
//once initiated PHPMAiler before you can get_spam_socre you need to execute preSend() since is the way to get the RAW email that will be sent. | |
$mail->preSend(); | |
$spam_score = get_spam_score($mail->getSentMIMEMessage()); | |
if ($spam_score >= 5 OR $spam_score === FALSE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* checks if is https by protocol used in nginx | |
* @return boolean | |
*/ | |
public static function is_HTTPS_protocol() | |
{ | |
//we are sure is a https request , we use first the Nginx forwarded PROTO OR apache | |
if( (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) AND $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* checks if is https by protocol used in nginx | |
* @return boolean | |
*/ | |
public static function is_HTTPS_protocol() | |
{ | |
//we are sure is a https request , we use first the Nginx forwarded PROTO OR apache | |
if( (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) AND $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
* Class email validator | |
* | |
* @author Chema <[email protected]> | |
* @copyright (c) 2015 | |
* @license GPL v3 | |
*/ | |
namespace App; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$merchant_id = 'merchant'; | |
$txnpassword = 'pwd'; | |
$order_id = 'order123'; | |
$amount = 5308;//53.2 | |
$currency = 'AUD'; | |
$fp_timestamp = gmdate('YmdHIis'); | |
$fingerprint = $merchant_id.'|'.$txnpassword.'|0|'.$order_id.'|'.$amount.'|'.$fp_timestamp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Securenet PHP library | |
* See docs https://apidocs.securenet.com/docs/ | |
* You need PHP >= 5.5 and CURL installed | |
* | |
* @category Payments | |
* @author Chema <[email protected]> | |
* @copyright (c) 2009-2016 Open Classifieds Team | |
* @license GPL v3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); | |
ini_set('display_errors', 1); | |
$license = 'YOURLICENSEHERE'; | |
$api_url = 'https://selfhosted.yclas.com/api/license/'.$license.'/?domain='.$_SERVER['HTTP_HOST']; | |
die(var_dump(json_decode(curl_get_contents($api_url)))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); | |
ini_set('display_errors', 1); | |
use PayPal\Service\AdaptivePaymentsService; | |
use PayPal\Types\AP\FundingConstraint; | |
use PayPal\Types\AP\FundingTypeInfo; | |
use PayPal\Types\AP\FundingTypeList; | |
use PayPal\Types\AP\PayRequest; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = new Array(10); | |
var b = new Array(10); | |
var c = new Array(10); | |
a[0] = "As soon as we fix the flood of resources "; | |
a[1] = "As soon as we have the tests "; | |
a[2] = "After we refactor the code "; | |
a[3] = "When we have the last bug fixed "; | |
a[4] = "When the installation problem it's solved "; | |
a[5] = "When we figure out why the process is down "; |