111
wishcraft
Security Sentry: Xortify Client 5.00

Resized Image

Security Sentry: PHP Security Sentry that uses multiple honeypots to defend your website in a cloud!
[size=x-large]Xortify Client 5.00[/size]


xortify (verb)

BrE Pronounced As: ˈfɔːtɪfaɪ
NaME Pronounced As: ˈfɔːrtɪfaɪ
Definable language scopes: xortifies, xortifying, xortified, xortifious, xorticity


Is it Ready?

Yes; the Xortify client for XOOPS 2.5 and XOOPS 2.6 is ready for download and installation, remember to put all the files across including the patches for erroneous code in protector; otherwise you will get a WSOD; also don't forget once you have installed to fill out the signup form; you can re-use the username between sites or have one individually for each it is up to you!

Contribute Plugins and Code Samples

Please keep adding to our archives here at chronolabs co-op if you have a file or link you would like to add to CMS Supporting API Plugins or Modules then contact us through the main contact for a quote or question form on www.labs.coop.

XOOPS

2.6.x - xoops2.6_xortify_4.16.zip - 4.3Mb
2.5.x - xoops2.5_xortify_5.00.zip = (- 7z -) (- tar.gz -) (- rar -) (- iso -) =

A bit about Xortify!

Xortify was developed in response to attacks on websites from rouge malicious bots, spam and captcha sweatshop, spam slavery as well as other forms of abuse of our clients systems. We have been able to stop close to 99% of spam and captcha attacks with the Xortify client. Believe it or not Xoritfy is also in response to human rights abuse on the web, such as captcha and spam sweat shops where individuals are paid less than 1 USD a day to set up accounts for bots to spam website by typing past captcha puzzles as well as sometimes they are even slaves.

Originally Xortify started out as a demo of the API X-JSON, X-CURL and X-SOAP for XOOPS 2 series and became a revolution in security for the XOOPS Platform. XOOPS comes with an application called Protector which prevents hacks and attacks to users of XOOPS and maintains a local ban list. This ban list is known as a bad IP that is an IP Address which has attacked by trying to cause for example a DOS (Denial of Service/F5 Attack), ingested unions and other forms of attack which protector by GIJOE from PEAK XOOPS - Support&Experiment in japan works on to prevent mal-users and would be hackers from exploiting the people that love xoops and other platforms. Xortify will syndicate your BadIP list with other peoples using Xortify so this cloud of protection forms in your system.

Xortify is an application or process which first started as a practial application to cloud computing for the XOOPS Community which shares protectors bad IPs with a contingent of end users of the Xortify application and one you have signed up ensures that members share their bad ips in IPv4 or IPv6 for the host or proxy with each other so that we are protected from each others website forensically with protector. Here athttp://xortify.com the main Node in the Xortify Cloud we host the current Bad IP List for the community so your website with the Xortify client running is pre-aware of a bad user and announces to them on all pages that they are banned unless the ban is cleared with one of our forms.

Previous Sponsors:

Special thanks goes to our previous sponsors for helping the world of spam - remember the code is stamped open source, so once you have a xortify.com site hosted with you; for you your xortify.xxx.xx is up to you... All you need to do is takeover account user one, and then goto the xortify server module and sign-up to the peering system for multinoded. We would like to start up some form of peers.labs.coop that is use to dial you to your closest peer in the IP Geographics to the services.

  • Arck Interactive – Cloud Hosting on Arck Cloud.
  • TPP Wholesale - Sounds like another TCP/IP.



112
wishcraft
Xortify 4.99.1 -- Release Update for XOOPS 2.5



xortify (verb)

BrE Pronounced As: ˈfɔːtɪfaɪ
NaME Pronounced As: ˈfɔːrtɪfaɪ
Definable language scopes: xortifies, xortifying, xortified, xortifious, xorticity


XOOPS Module Downloads

2.6.x - xoops2.6_xortify_4.16.zip - 4.3Mb
2.5.x - xoops2.5_xortify_4.99.1.zip - 400Kb :: (- 7z -) (- tar.gz -) (- rar -) (- iso -)

Songs Supporting API Plugins or Module

* Xortify - xortify.mp3 - 4Mb - Download Binary Corpse Xortify Song

Is it Ready?

Yes; the Xortify client for XOOPS 2.5 and XOOPS 2.6 is ready for download and installation, remember to put all the files across including the patches for erroneous code in protector; otherwise you will get a WSOD; also don't forget once you have installed to fill out the signup form; you can re-use the username between sites or have one individually for each it is up to you!

A bit about Xortify!

Xortify was developed in response to attacks on websites from rouge malicious bots, spam and captcha sweatshop, spam slavery as well as other forms of abuse of our clients systems. We have been able to stop close to 99% of spam and captcha attacks with the Xortify client. Believe it or not Xoritfy is also in response to human rights abuse on the web, such as captcha and spam sweat shops where individuals are paid less than 1 USD a day to set up accounts for bots to spam website by typing past captcha puzzles as well as sometimes they are even slaves.

Originally Xortify started out as a demo of the API X-JSON, X-CURL and X-SOAP for XOOPS 2 series and became a revolution in security for the XOOPS Platform. XOOPS comes with an application called Protector which prevents hacks and attacks to users of XOOPS and maintains a local ban list. This ban list is known as a bad IP that is an IP Address which has attacked by trying to cause for example a DOS (Denial of Service/F5 Attack), ingested unions and other forms of attack which protector by GIJOE from PEAK XOOPS - Support&Experiment in japan works on to prevent mal-users and would be hackers from exploiting the people that love xoops and other platforms. Xortify will syndicate your BadIP list with other peoples using Xortify so this cloud of protection forms in your system.

Xortify is an application or process which first started as a practial application to cloud computing for the XOOPS Community which shares protectors bad IPs with a contingent of end users of the Xortify application and one you have signed up ensures that members share their bad ips in IPv4 or IPv6 for the host or proxy with each other so that we are protected from each others website forensically with protector. Here athttp://xortify.com the main Node in the Xortify Cloud we host the current Bad IP List for the community so your website with the Xortify client running is pre-aware of a bad user and announces to them on all pages that they are banned unless the ban is cleared with one of our forms.

To be a contributor to the Xortify cloud you will need a username and password which you can sign up for in the software, you only need really one username and password per website or even per webmaster, it it really upto you. We also contribute to Stop Forum Spam as well as using Project Honeypot as a resource and are recieving their ban list as well. A ban is kept for 3 months then automatically removed from the system to ensure truency is in check we also only list a ban really only once not multiple times, sometimes a ban is listed twice when it is causing multiple intrusions on the network but this is a rarity.

Anyone can join Xortify and you don't need to use xortify's software to maintain, or put additional bans on the framework. If you happen to be a webmaster then you are welcome to view our API Documentation to see how we can intergrate with your environment. We offer wGET, CURL and SOAP api for you use. All you need is a username!!



113
wishcraft
Project ModFix 1.1 -- Over the coming weeks

How are you all? A couple of comments, a lot of the modules I have written on SVN where back in XOOPS 2.2, 2.3 & 2.4... I have been holidaying for a bit but below is a list of everything on SVN that I will be running over the next month or two to make sure they all work and are ready for XOOPS 2.5 for migration to XOOPS 2.6.. I just want to finish the new development work first then I will commence this ModFix 1.1 Project.

The following modules I have used on XOOPS 2.5 and seem to be fine, the rest I will need to test and make any changes that are required. The following modules you can get fromhttp://sourceforge.net/projects/chronolabs/files as well ashttp://sourceforge.net/projects/xortify/files ::- you will see we have a five star rated virus free stamp!

Know personal experiences to Work:--
  • xortify
  • xpayment
  • signed
  • xcenter



Finish New Development of Alpha/Prealpha:--
  • radioo
  • xtalky


ModFix list for XOOPS 2.5.7:--
  • ajaxfilemanager
  • twitterbomb
  • obituaries
  • vidshop
  • vjmixes
  • prizes
  • vod
  • profile
  • compounds
  • psychtest
  • radioo
  • wflink
  • donations
  • xalky
  • dr-usage
  • xcenter
  • escorts
  • sam
  • scroller
  • xcurl
  • flowplayer
  • xdonations
  • sexy
  • shoutbox
  • xforum
  • signed
  • xhelp
  • genobio
  • googleapi
  • xincodes
  • xinvite
  • xjson
  • songlist
  • xnews
  • speedtest
  • iplog
  • statistics
  • lawsuit
  • xoopspoll
  • linkedinbomb
  • maquee
  • xortify
  • xpayment
  • xpetitions
  • xpnews
  • xquiz
  • membership
  • xreaggregator
  • xrest
  • tbdev
  • xserial
  • multisite
  • myalbum
  • xtransam


Finish Development of Alpha/Prealpha:--
  • xshop


Discontinued:--
  • phpdoc



114
wishcraft
Cron4://cron-twits.php - Executable CronJob or Sceduduled Task -- forums, tag's categories!!

Executable CronJob or Sceduduled Task -- forums, tag's categories!!


<?php
/**
 *  Xoops Functions
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         crons
 * @since           2.5.7
 * @version         $Id: cron-twits.php XXXXX XXXX-XX-XX XX:XX:XXZ xxxxxx $
 */ 

error_reporting(E_ERROR);
set_time_limit(2999);
ini_set('display_errors'1);
ini_set('error_log'dirname(__FILE__) . DIRECTORY_SEPARATOR "errors.txt");
require_once(
dirname(__FILE__) . DIRECTORY_SEPARATOR "TwitterAPIExchange.php");
/**
 * Gets a response from a URL with cURL or wGET
 * @param string $url
 * @param array $params
 * @param string $context
 * @param array $header
 * @param string $method
 * @return string|mixed|boolean
 */
function getURL($url$params$context ''$header = array(), $method 'GET') {
    if (!
function_exists('curl_init')||$method=='FGC') {
        
$url .= '?'.http_build_query($params);
        
$data file_get_contents$url0$context );
        return 
$data;
    } else {
        if (
$ch curl_init()) {
            if (!
is_array($header))
                
$header explode("n"str_replace("r"""$header));
            if (
count($header)>0)
                
curl_setopt($ch,CURLOPT_HTTPHEADER$header);
            switch(
$method) {
                default:
                case 
'GET':
                    
$url .= '?'.http_build_query($params);
                    break;
                case 
'POST':
                    
curl_setopt($chCURLOPT_POST1);
                    
curl_setopt($chCURLOPT_POSTFIELDShttp_build_query($params));
            }
            
curl_setopt($chCURLOPT_URL$url);
            
//curl_setopt($ch, CURLOPT_HEADER, 1);
            
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER0);
            
curl_setopt($chCURLOPT_SSL_VERIFYHOSTfalse);
            
curl_setopt($chCURLOPT_RETURNTRANSFER1);
            
curl_setopt($chCURLOPT_USERAGENT'Chronolabs Translation API 1.02 - PHP Version ' PHP_VERSION.'');
            
$data curl_exec($ch);
            
curl_close($ch);
            return 
$data;
        }
    }
    return 
false;
}
error_reporting(E_ERROR);
$settings['twitter']['Cipherocity'] = array(
        
'oauth_access_token' => "----------------------------------------------------",
        
'oauth_access_token_secret' => ""----------------------------------------------------",
        'consumer_key' => ""----------------------------------------------------"
,
        
'consumer_secret' => ""----------------------------------------------------"
);
define("
_REPLY", "@%s topic similar %s this article %s entitled'%s'");
mt_srand(mt_rand(-microtime(true), microtime(true)));
mt_srand(mt_rand(-microtime(true), microtime(true)));
mt_srand(mt_rand(-microtime(true), microtime(true)));
mt_srand(mt_rand(-microtime(true), microtime(true)));
error_reporting(E_ERROR);
include_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "
web" . DIRECTORY_SEPARATOR . "public_html" . DIRECTORY_SEPARATOR . "mainfile.php";
if (isset(
$GLOBALS['xoops']))
    include_once 
$GLOBALS['xoops']->path("/class/cache/xoopscache.php");
ini_set('display_errors', 1);
ini_set('error_log', dirname(__FILE__) . DIRECTORY_SEPARATOR . "
errors.txt");
error_reporting(E_ERROR);

foreach (
$settings['twitter'] as $key => $setting) {
    
$tweets = array();
    foreach(file(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'retweet.diz') as 
$id => $line)
    {
        
$parts = explode("|", $line);
        
$range = explode("-", $parts[1]);
        
$searchfor[$id][$parts[0]] = mt_rand($range[0]$range[1]);
    }
    foreach(
$searchfor as $term => $count) {
        if (defined('XOOPS_ROOT_PATH'))
            if (!
$results = XoopsCache:: read('tweetercron_'.str_replace(' ', '_', strtolower($term)))) {
                
$results = array('since_id'=>0);
            }
        else
            
$results = array('since_id'=>0);
        
$url = 'https://api.twitter.com/1.1/search/tweets.json';
        
$getfield = '?q='.urlencode($term).'&'.($result['since_id']!=0?'since_id='.$result['since_id'].'&':'').'result_type=mixed&count='.$count;
        
$postfields = array();
        
$requestMethod = 'GET';
        
$twitter = new TwitterAPIExchange($setting);
        
$tweets[] = array_merge(json_decode($twitter    ->setGetfield($getfield)
                                                        ->buildOauth(
$url$requestMethod)
                                                        ->performRequest(), true), array('count' => 
$count));
    }            
    foreach(
$tweets as $keyb => $tweet
    {
        if (
$tweet['user']['screen_name'] != $key
        {
            if (is_array(
$tweet)&&!empty($tweet)) 
            {
                
$count = $tweet['count'];
                
$keys = array_keys($tweet);
                while(count(
$tweet)>$count) {
                    
$key = $keys[mt_rand(0, count($keys)-1)];
                    unset(
$tweet[$key]);
                    unset(
$keys[$key]);
                }
                foreach(
$tweet as $key => $values
                {
                    if (
$values['user']['screen_name'] != $key
                    {
                        switch (
$key
                        {
                            case 'statuses':
                                foreach(
$values as $keyb => $valuesb
                                {

                                    
$url = 'https://api.twitter.com/1.1/statuses/retweet/'.$valuesb['id_str'].'.json';
                                    
$requestMethod = 'POST';
                                    
$postfields = array();
                                    
$twitter = new TwitterAPIExchange($setting);
                                    
$retweets[] = json_decode($twitter    ->buildOauth($url$requestMethod)
                                                                        ->setPostfields(
$postfields)
                                                                        ->performRequest(), true);
                                    echo "
Retweeted" . ($last = $valuesb['id_str']) . " :: " . $valuesb['text'] . "</br>";
                                }
                                if (defined('XOOPS_ROOT_PATH') && class_exists("
XoopsCache"))
                                    XoopsCache::write('tweetercron_'.str_replace(' ', '_', strtolower(
$term)), array('since_id'=>$last));
                                break;
                            case 'search_metadata':
                                if (defined('XOOPS_ROOT_PATH') && class_exists("
XoopsCache"))
                                    XoopsCache::write('tweetercron_'.str_replace(' ', '_', strtolower(
$term)), array('since_id'=>$values['since_id']));
                                break;
                        }
                    }
                }
            }
        }
    }
        
    
$tweets = array();
    
$searchfor = array();
    
$resulters = array();
    foreach(file(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'replies.diz') as 
$id => $line)
    {
        
$parts = explode("|", $line);
        
$range = explode("-", $parts[2]);
        foreach(json_decode(getURL(
$parts[1]), true) as $term => $data
            
$searchfor[$term][mt_rand($range[0]$range[1])] = array_merge($data, array("suffix" => $parts[0]));
    }
    foreach(
$searchfor as $tterm => $resource
    {
        
$skip = false;
        foreach(
$resource as $count => $data)
        {
            if (
$skip != true)
            {
                foreach(
$data as $identy => $termset
                {
                    if (
$skip != true)
                    {
                        
$secondary = $termidor = array_merge(explode(" ", $termset["title"]), $termset['plus']);
                        shuffle(
$termidor);
                        shuffle(
$termidor);
                        shuffle(
$termidor);
                        shuffle(
$termidor);
                        shuffle(
$termidor);
                        shuffle(
$secondary);
                        shuffle(
$secondary);
                        shuffle(
$secondary);
                        shuffle(
$secondary);
                        shuffle(
$secondary);    
                        foreach(
$termidor as $tteerm) {                
                            foreach(
$secondary as $stteerm)
                            {
                                if (
$skip != true && $stteerm != $tteerm)
                                {
                                    
$resulters[$term = $tterm . " " . $tteerm . " " . $stteerm] = array('title' => $termset['title'], 'url' => $termset['url'], 'count' => $count);                        
                                    if (defined('XOOPS_ROOT_PATH'))
                                        if (!
$results = XoopsCache:: read('twitscron_'.str_replace(' ', '_', strtolower($term)))) {
                                            
$results = array('since_id'=>0);
                                        }
                                    else
                                        
$results = array('since_id'=>0);
        
                                    
$url = 'https://api.twitter.com/1.1/search/tweets.json';
                                    
$getfield = '?q='.urlencode($term).'&'.($result['since_id']!=0?'since_id='.$result['since_id'].'&':'').'result_type=mixed&count='.$count;
                                    
$postfields = array();
                                    
$requestMethod = 'GET';
                                    
$twitter = new TwitterAPIExchange($setting);
                                    
$rrt = $rrt + count($tweets[$term][$termset['suffix']][] = json_decode($twitter    ->setGetfield($getfield)
                                            ->buildOauth(
$url$requestMethod)
                                            ->performRequest(), true));
                                    if (
$rrt >= $count)
                                        
$skip = true;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    
$keys = array_keys($resulters);
    shuffle(
$keys);
    shuffle(
$keys);
    shuffle(
$keys);
    shuffle(
$keys);
    shuffle(
$keys);
    foreach(
$keys as $term) {
        foreach(
$tweets[$term] as $suffix => $twits) {
            foreach(
$twits as $keyb => $tweet) {
                if (
$tweet['user']['screen_name'] != $key) {
                    if (is_array(
$tweet)&&!empty($tweet)) {
                        
$number = 0;
                        
$count = $resulters[$term]['count'];
                        
$keys = array_keys($tweet);
                        while(count(
$tweet)>$count) {
                            
$key = $keys[mt_rand(0, count($keys)-1)];
                            unset(
$tweet[$key]);
                            unset(
$keys[$key]);
                        }
                        if (!count(
$tweet['errors']))
                        {
                            foreach(
$tweet as $key => $values) {
                                if (
$values['user']['screen_name'] != $key) {
                                    switch (
$key) {
                                        case 'statuses':
                                            foreach(
$values as $keyb => $valuesb) {
                                                
                                                    
$geoRand = json_decode(getURL("http://places.labs.coop/v1/random/random/json.api"), true);
                                                    
$url 'https://api.twitter.com/1.1/statuses/update.json';
                                                    
$requestMethod 'POST';
                                                    
$res sprintf(_REPLY$valuesb['user']['screen_name'], $suffix$resulters[$term]['url'], $resulters[$term]['title']);
                                                    
$postfields = array('status' => $res'in_reply_to_status_id' => $valuesb['id_str'], 'possibly_sensitive' => 'true''lat' => (float)$geoRand['place']["Latitude_Float"], 'long' => (float)$geoRand['place']["Longitude_Float"], 'display_coordinates' => 'true');
                                                    
$twitter = new TwitterAPIExchange($setting);
                                                    
$retweets[] = json_decode($twitter    ->buildOauth($url$requestMethod)
                                                            ->
setPostfields($postfields)
                                                            ->
performRequest(), true);
                                                    echo 
"Reply: " . ($last $valuesb['id_str']) . " :: " $res "</br>";
                                                    
$number++;
                                            }
                                            if (
defined('XOOPS_ROOT_PATH') && class_exists("XoopsCache"))
                                                
XoopsCache::write('twitscron_'.str_replace(' ''_'strtolower($term)), array('since_id'=>$last));
                                            break;
                                        case 
'search_metadata':
                                            if (
defined('XOOPS_ROOT_PATH') && class_exists("XoopsCache"))
                                                
XoopsCache::write('twitscron_'.str_replace(' ''_'strtolower($term)), array('since_id'=>$values['since_id']));
                                            break;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    
    
$url 'https://api.twitter.com/1.1/followers/ids.json';
    
$getfield 'cursor=-1&screen_name='.$key.'&count=5000';
    
$requestMethod 'GET';
    
$postfields = array();
    
$twitter = new TwitterAPIExchange($setting);
    
$friends $twitter    ->setGetfield($getfield)
                         ->
buildOauth($url$requestMethod)
                        ->
performRequest();

    if (isset(
$friends['ids'])) {
        foreach(
$friends['ids'] as $id) {
            
$url 'https://api.twitter.com/1.1/friendships/create.json ';
            
$requestMethod 'POST';
            
$postfields = array('user_id'=>$id'follow'=>true);
            
$twitter = new TwitterAPIExchange($setting);
            
$friends $twitter    ->buildOauth($url$requestMethod)
                                ->
setPostfields($postfields)
                                ->
performRequest();        
        }
    }
}

?>



115
wishcraft
Cron3://TwitterAPIExchange.php - tweetable.php to dial for replies -- forums, tag's categories!!

PHP - Linux - (With tag's,categories!! Lookup)

This example shows a class for talking to the Twitter API 1.1 on twitter with an application with write mode enabled set up as an application token system withhttp://apps.twitter.com

<?php

/**
 * Twitter-API-PHP : Simple PHP wrapper for the v1.1 API
 * 
 * PHP version 5.3.10
 * 
 * @category Awesomeness
 * @package  Twitter-API-PHP
 * @author   James Mallison <me@j7mbo.co.uk>
 * @license  MIT License
 * @link     http://github.com/j7mbo/twitter-api-php
 */
class TwitterAPIExchange
{
    private 
$oauth_access_token;
    private 
$oauth_access_token_secret;
    private 
$consumer_key;
    private 
$consumer_secret;
    private 
$postfields;
    private 
$getfield;
    protected 
$oauth;
    public 
$url;

    
/**
     * Create the API access object. Requires an array of settings::
     * oauth access token, oauth access token secret, consumer key, consumer secret
     * These are all available by creating your own application on dev.twitter.com
     * Requires the cURL library
     * 
     * @param array $settings
     */
    
public function __construct(array $settings)
    {
        if (!
in_array('curl'get_loaded_extensions())) 
        {
            throw new 
Exception('You need to install cURL, see: http://curl.haxx.se/docs/install.html');
        }
        
        if (!isset(
$settings['oauth_access_token'])
            || !isset(
$settings['oauth_access_token_secret'])
            || !isset(
$settings['consumer_key'])
            || !isset(
$settings['consumer_secret']))
        {
            throw new 
Exception('Make sure you are passing in the correct parameters');
        }

        
$this->oauth_access_token $settings['oauth_access_token'];
        
$this->oauth_access_token_secret $settings['oauth_access_token_secret'];
        
$this->consumer_key $settings['consumer_key'];
        
$this->consumer_secret $settings['consumer_secret'];
    }
    
    
/**
     * Set postfields array, example: array('screen_name' => 'J7mbo')
     * 
     * @param array $array Array of parameters to send to API
     * 
     * @return TwitterAPIExchange Instance of self for method chaining
     */
    
public function setPostfields(array $array)
    {
        if (!
is_null($this->getGetfield())) 
        { 
            throw new 
Exception('You can only choose get OR post fields.'); 
        }
        
        if (isset(
$array['status']) && substr($array['status'], 01) === '@')
        {
            
$array['status'] = sprintf("%s"$array['status']);
        }
        
        
$this->postfields $array;
        
        return 
$this;
    }
    
    
/**
     * Set getfield string, example: '?screen_name=J7mbo'
     * 
     * @param string $string Get key and value pairs as string
     * 
     * @return TwitterAPIExchange Instance of self for method chaining
     */
    
public function setGetfield($string)
    {
        if (!
is_null($this->getPostfields())) 
        { 
            throw new 
Exception('You can only choose get OR post fields.'); 
        }
        
        
$search = array('#'',''+'':');
        
$replace = array('%23''%2C''%2B''%3A');
        
$string str_replace($search$replace$string);  
        
        
$this->getfield $string;
        
        return 
$this;
    }
    
    
/**
     * Get getfield string (simple getter)
     * 
     * @return string $this->getfields
     */
    
public function getGetfield()
    {
        return 
$this->getfield;
    }
    
    
/**
     * Get postfields array (simple getter)
     * 
     * @return array $this->postfields
     */
    
public function getPostfields()
    {
        return 
$this->postfields;
    }
    
    
/**
     * Build the Oauth object using params set in construct and additionals
     * passed to this method. For v1.1, see: https://dev.twitter.com/docs/api/1.1
     * 
     * @param string $url The API url to use. Example: https://api.twitter.com/1.1/search/tweets.json
     * @param string $requestMethod Either POST or GET
     * @return TwitterAPIExchange Instance of self for method chaining
     */
    
public function buildOauth($url$requestMethod)
    {
        if (!
in_array(strtolower($requestMethod), array('post''get')))
        {
            throw new 
Exception('Request method must be either POST or GET');
        }
        
        
$consumer_key $this->consumer_key;
        
$consumer_secret $this->consumer_secret;
        
$oauth_access_token $this->oauth_access_token;
        
$oauth_access_token_secret $this->oauth_access_token_secret;
        
        
$oauth = array( 
            
'oauth_consumer_key' => $consumer_key,
            
'oauth_nonce' => time(),
            
'oauth_signature_method' => 'HMAC-SHA1',
            
'oauth_token' => $oauth_access_token,
            
'oauth_timestamp' => time(),
            
'oauth_version' => '1.0'
        
);
        
        
$getfield $this->getGetfield();
        
        if (!
is_null($getfield))
        {
            
$getfields str_replace('?'''explode('&'$getfield));
            foreach (
$getfields as $g)
            {
                
$split explode('='$g);
                
$oauth[$split[0]] = $split[1];
            }
        }
        
        
$base_info $this->buildBaseString($url$requestMethod$oauth);
        
$composite_key rawurlencode($consumer_secret) . '&' rawurlencode($oauth_access_token_secret);
        
$oauth_signature base64_encode(hash_hmac('sha1'$base_info$composite_keytrue));
        
$oauth['oauth_signature'] = $oauth_signature;
        
        
$this->url $url;
        
$this->oauth $oauth;
        
        return 
$this;
    }
    
    
/**
     * Perform the actual data retrieval from the API
     * 
     * @param boolean $return If true, returns data.
     * 
     * @return string json If $return param is true, returns json data.
     */
    
public function performRequest($return true)
    {
        if (!
is_bool($return)) 
        { 
            throw new 
Exception('performRequest parameter must be true or false'); 
        }
        
        
$header = array($this->buildAuthorizationHeader($this->oauth), 'Expect:');
        
        
$getfield $this->getGetfield();
        
$postfields $this->getPostfields();

        
$options = array( 
            
CURLOPT_HTTPHEADER => $header,
            
CURLOPT_HEADER => false,
            
CURLOPT_URL => $this->url,
            
CURLOPT_RETURNTRANSFER => true,
            
CURLOPT_TIMEOUT => 10,
        );

        if (!
is_null($postfields))
        {
            
$options[CURLOPT_POSTFIELDS] = $postfields;
        }
        else
        {
            if (
$getfield !== '')
            {
                
$options[CURLOPT_URL] .= $getfield;
            }
        }

        
$feed curl_init();
        
curl_setopt_array($feed$options);
        
$json curl_exec($feed);
        
//var_dump($options);
        //print_r(curl_getinfo($feed), true);
        
        
curl_close($feed);

        if (
$return) { return $json; }
    }
    
    
/**
     * Private method to generate the base string used by cURL
     * 
     * @param string $baseURI
     * @param string $method
     * @param array $params
     * 
     * @return string Built base string
     */
    
private function buildBaseString($baseURI$method$params
    {
        
$return = array();
        
ksort($params);
        
        foreach(
$params as $key=>$value)
        {
            
$return[] = "$key=" $value;
        }
        
        return 
$method "&" rawurlencode($baseURI) . '&' rawurlencode(implode('&'$return)); 
    }
    
    
/**
     * Private method to generate authorization header used by cURL
     * 
     * @param array $oauth Array of oauth data generated by buildOauth()
     * 
     * @return string $return Header used by cURL for request
     */    
    
private function buildAuthorizationHeader($oauth
    {
        
$return 'Authorization: OAuth ';
        
$values = array();
        
        foreach(
$oauth as $key => $value)
        {
            
$values[] = "$key="" . rawurlencode($value) . """;
        }
        
        
$return .= implode(', '$values);
        return 
$return;
    }

}



116
wishcraft
Cron2://retweets.diz - tweetable.php to dial for replies -- forums, tag's categories!!

PHP - Linux - (With tag's,categories!! Lookup)

This example shows the data file stored on the remote system running the cron, this is a flat text file with Linux Page break for service://retweets.diz

File Contents -:SearchTerm|minimumlot-maximumlot\n
Cipherocity|11-19
ChronolabsCoop
|6-13
PublicHoneypot
|6-13
AusPol
|2-5



117
wishcraft
Cron1://replies.diz - tweetable.php to dial for replies -- forums, tag's categories!!

PHP - Linux - (With tag's,categories!! Lookup)

This example shows the data file stored on the remote system running the cron, this is a flat text file with Linux Page break for service://replies.diz

File Contents -:SourceOpen|http://Part1-remote-tweetables.php|minimumlot-maximumlot\n
@Cipherocity|http://cipher.labs.coop/tweetable.php|8-13
@hempembassy|http://hempembassy.net/tweetable.php|7-21



118
wishcraft
Part1://tweetables.php - Includes ie. for wordpress -- forums, tag's categories!!

XOOPS - (With Xforum Lookup)

This example is retrieving the pages with tag categories to receive a dial-able file for crons to find categories of content like a journal for suggestion of links on twitter like where this file is fromhttp://hempembassy.net/tweetable.php..


<?php
/**
 *  Xoops Functions
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         kernel
 * @since           2.5.7
 * @version         $Id: tweetables.php XXXXX XXXX-XX-XX XX:XX:XXZ xxxxxx $
 */ 


    
$supports = array('xforum''xcenter');
    require_once( 
dirname(__FILE__) . '/mainfile.php' );
    @include_once 
XOOPS_ROOT_PATH "/modules/tag/include/functions.php";
    
    
$module_handler xoops_gethandler('module');
    
$modids = array();
    foreach(
$supports as $dirname) {
        
$mod $module_handler->getByDirname($dirname);
        if (
is_object($mod))
            
$modids[$mod->getVar('mid')] = $mod->getVar('mid');
    }
    
$results = array();
    
$criteria = new criteria('tag_modid'"(" implode(", "$modids) . ")""IN");
    
$criteria->setSort("RAND()");
    
$criteria->setLimit(mt_rand(2242));
    
$links_handler xoops_getmodulehandler('link''tag');
    
$tags_handler xoops_getmodulehandler('tag''tag');
    
$tags $mods_ids $cats_ids $items_ids = array();
    foreach(
$links_handler->getObjects($criteriafalse) as $link)
    {
        
$items_ids[$link->getVar("tag_itemid")] = $link->getVar("tag_itemid");
        
$cats_ids[$link->getVar("tag_catid")] = $link->getVar("tag_catid");
        
$mods_ids[$link->getVar("tag_modid")] = $link->getVar("tag_modid");
        
$obj $tags_handler->get($link->getVar("tag_id"));
        
$tags[$obj->getVar('tag_term')] = array("tag_id" => $obj->getVar('tag_id'), "tag_itemid" => $link->getVar("tag_itemid"));
    }
    
    
$criteria = new CriteriaCompo(new Criteria("o.tag_itemid""(" implode(", "$items_ids) . ")""IN"));
    
$criteria->setOrder('RAND()');
    if (!empty(
$mods_ids)) {
        
$criteria->add( new Criteria("o.tag_modid""(" implode(", "$mods_ids) . ")""IN"));
        if (!empty(
$cats_ids)) {
            
$criteria->add( new Criteria("o.tag_catid""(" implode(", "$cats_ids) . ")""IN"));
        }
    }
    
$items $tags_handler->getItems($criteria); // Tag, imist, start, sort, order, modid, catid
    
$items_module = array();
    
$modules_obj = array();
    if (!empty(
$items)) {
        foreach (
array_keys($items) as $key) {
            
$items_module[$items[$key]["modid"]][$items[$key]["itemid"]] = $tags_handler->getByItem($items[$key]["itemid"], $items[$key]["modid"], $items[$key]["catid"]);
        }
        
$module_handler =& xoops_gethandler('module');
        
$modules_obj $module_handler->getObjects(new Criteria("mid""(" implode(", "array_keys($modids)) . ")""IN"), true);
        foreach (
array_keys($modules_obj) as $mid) {
            try {
                    
                
$dirname $modules_obj[$mid]->getVar("dirname""n");
                
xoops_loadLanguage('modinfo'$dirname);
                
                
// Return related item infomation: title, content, time, uid, all tags
                
foreach(array_keys($items_module[$mid]) as $identy)
                {
                    switch (
$dirname)
                    {
                        case 
"xforum":
                            
$post_handler xoops_getmodulehandler('post'$dirname);
                            
$post $post_handler->get($identy);
                            if (
is_object($post))
                            {
                                
$results[$base root_tag($items_module[$mid][$identy], array_keys($tags))][$identy]['title'] = $post->getVar('subject');
                                
$results[$base][$identy]['url'] = $post->getURL();
                                foreach(
$items_module[$mid][$identy] as $tag_id => $tag)
                                if (!
in_array($tag$tags))
                                    
$results[$base][$identy]['plus'][$tag_id] = $tag;
                            }
                            break;
                        case 
"xcenter":
                            require_once(
$GLOBALS['xoops']->path(_XTR_PATH_PHP_FUNCTIONS));
                            
$content_handler xoops_getmodulehandler('xcenter'$dirname);
                            
$post $content_handler->getContent($identy);
                            if (
is_object($post))
                            {
                                
$results[$base root_tag($items_module[$mid][$identy], array_keys($tags))][$identy]['title'] = $post['title']->getVar('title');
                                
$results[$base][$identy]['url'] = XOOPS_URL "/modules/$dirname/?storyid=$identy";
                                foreach(
$items_module[$mid][$identy] as $tag_id => $tag)
                                if (!
in_array($tag$tags))
                                    
$results[$base][$identy]['plus'][$tag_id] = $tag;
                            }
                            break;
                    }
                }
                
            }
            catch (
Exception $e) { echo "$e<br/>"; }
        }
    }
    
header('Origin: *');
    
header('Access-Control-Allow-Origin: *');
    
header('Context-type: application/json');
    echo 
json_encode($results);
    exit(
0);
    
    function 
root_tag($res = array(), $tags = array())
    {
        foreach(
$res as $id => $tag)
            if (
in_array($tag$tags))
                return 
$tag;
    }
?>

[size=large]WORDPRESS - (With Categories & Tags Lookup)[/size]

[font=Courier][size=x-large][color=006633]This example is retrieving the pages with tag categories to receive a dial-able file for crons to find categories of content like a journal for suggestion of links on twitter like where this file is from http://simonaroberts.com/tweetable.php..[/color][/size][/font]


[code]
<?php

/**
 *  Xoops Functions
 *
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 * @package         kernel
 * @since           2.5.7
 * @version         $Id: tweetables.php XXXXX XXXX-XX-XX XX:XX:XXZ xxxxxx $
 */ 
    
require_once( dirname(__FILE__) . '/wp-load.php' );
    
$results = array();
    
$objects $wpdb->get_results("SELECT tr.object_id, tt.term_id, tt.count, tm.name FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id INNER JOIN $wpdb->terms AS tm ON tm.term_id = tt.term_id WHERE tt.taxonomy IN ('category', 'post_tag') ORDER BY RAND() LIMIT 10");
    foreach(
$objects as $object)
    {
        
$posts = (array)get_objects_in_term($object->term_id, array('category''post_tag'));
        foreach(
$posts as $id => $post_id
        {

            
$post get_post($post_id'ARRAY');
            
$results[$object->name][$post_id]['title'] = $post->post_title;
            
$results[$object->name][$post_id]['url'] = get_option('home') . "?p=$post_id";
            foreach(
wp_get_object_terms($post_id, array('category''post_tag')) as $term)
                if (
$term->name!=$object->name)
                    
$results[$object->name][$post_id]['plus'][$term->term_id] = $term->name;
        }
            
    }
    
header('Origin: *');
    
header('Access-Control-Allow-Origin: *');
    
header('Context-type: application/json');
    echo 
json_encode($results);
    exit(
0);
?>



119
wishcraft
Fix for xoops_getBaseDomain::== COOKIE Dependant System ~~ data.iana.org

https://data.iana.org/TLD/tlds-alpha-by-domain.txt
/**
 * YOU SHOULD NOT THIS METHOD, IT WILL BE REMOVED
 */
/**
 * Function to get the base domain name from a URL.
 * credit for this function should goto Phosphorus and Lime, it is released under LGPL.
 *
 * @param string $url the URL to be stripped.
 * @param int    $debug
 * @return string
 * @deprecated
 */
function xoops_getBaseDomain($url$debug 0)
{
    
xoop_load('xoopscache');
    
$base_domain '';
    
$url strtolower($url);

    
// generic tlds (source: http://en.wikipedia.org/wiki/Generic_top-level_domain)
    
if (!$G_TLD XoopsCache::read('gtlds-alpha-by-domain'))
    {
           
$G_TLD array_merge(array('localhost''127.0.0.1''::1''ip6-localhost'), explode("n"file_get_content("https://data.iana.org/TLD/tlds-alpha-by-domain.txt")));
           unset(
$G_TLD[4]);
           
XoopsCache::write('gtlds-alpha-by-domain'$G_TLD[4], 3600 3.751);
    }

    
$C_TLD = array(
    
// active
    
'ac','ad','ae','af','ag','ai','al','am','an','ao','aq','ar','as','at','au','aw','ax','az',
    
'ba','bb','bd','be','bf','bg','bh','bi','bj','bm','bn','bo','br','bs','bt','bw','by','bz',
    
'ca','cc','cd','cf','cg','ch','ci','ck','cl','cm','cn','co','cr','cu','cv','cx','cy','cz',
    
'de','dj','dk','dm','do','dz','ec','ee','eg','er','es','et','eu','fi','fj','fk','fm','fo',
    
'fr','ga','gd','ge','gf','gg','gh','gi','gl','gm','gn','gp','gq','gr','gs','gt','gu','gw',
    
'gy','hk','hm','hn','hr','ht','hu','id','ie','il','im','in','io','iq','ir','is','it','je',
    
'jm','jo','jp','ke','kg','kh','ki','km','kn','kr','kw','ky','kz','la','lb','lc','li','lk',
    
'lr','ls','lt','lu','lv','ly','ma','mc','md','mg','mh','mk','ml','mm','mn','mo','mp','mq',
    
'mr','ms','mt','mu','mv','mw','mx','my','mz','na','nc','ne','nf','ng','ni','nl','no','np',
    
'nr','nu','nz','om','pa','pe','pf','pg','ph','pk','pl','pn','pr','ps','pt','pw','py','qa',
    
're','ro','ru','rw','sa','sb','sc','sd','se','sg','sh','si','sk','sl','sm','sn','sr','st',
    
'sv','sy','sz','tc','td','tf','tg','th','tj','tk','tl','tm','tn','to','tr','tt','tv','tw',
    
'tz','ua','ug','uk','us','uy','uz','va','vc','ve','vg','vi','vn','vu','wf','ws','ye','yu',
    
'za','zm','zw',
    
// inactive
    
'eh','kp','me','rs','um','bv','gb','pm','sj','so','yt','su','tp','bu','cs','dd','zr');

    
// get domain
    
if (!$full_domain xoops_getUrlDomain($url)) {
        return 
$base_domain;
    }

    
// break up domain, reverse
    
$DOMAIN explode('.'$full_domain);
    if (
$debug) {
        
print_r($DOMAIN);
    }
    
$DOMAIN array_reverse($DOMAIN);
    if (
$debug) {
        
print_r($DOMAIN);
    }
    
// first check for ip address
    
if (count($DOMAIN) == && is_numeric($DOMAIN[0]) && is_numeric($DOMAIN[3])) {
        return 
$full_domain;
    }

    
// if only 2 domain parts, that must be our domain
    
if (count($DOMAIN) <= 2) {
        return 
$full_domain;
    }

    
/*
    finally, with 3+ domain parts: obviously D0 is tld now,
    if D0 = ctld and D1 = gtld, we might have something like com.uk so,
    if D0 = ctld && D1 = gtld && D2 != 'www', domain = D2.D1.D0 else if D0 = ctld && D1 = gtld && D2 == 'www',
    domain = D1.D0 else domain = D1.D0 - these rules are simplified below.
    */
    
if (in_array($DOMAIN[0], $C_TLD) && in_array($DOMAIN[1], $G_TLD) && $DOMAIN[2] != 'www') {
        
$full_domain $DOMAIN[2] . '.' $DOMAIN[1] . '.' $DOMAIN[0];
    } else {
        
$full_domain $DOMAIN[1] . '.' $DOMAIN[0];
    }
    
// did we succeed?
    
return $full_domain;
}



120
wishcraft
XOOPS 2.5 Theme :--: Sexting - Version 1.0.1

Resized Image

This theme has been designed for XOOPS 2.5 by the Chronolabs Cooperative and is open for use by the general public this video will show you around it:-

Video:



https://www.youtube.com/watch?v=eyd3sol4Gp8&feature=youtu.be


Features:
  • Changing Gradients
  • Global navigation
  • Right & Left Blocks
  • Center blocks
  • Radio from shoutcast.com


Download:





TopTop
« 1 ... 9 10 11 (12) 13 14 15 ... 135 »



Login

Who's Online

189 user(s) are online (123 user(s) are browsing Support Forums)


Members: 0


Guests: 189


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits