Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-30-2013, 08:30 AM   #1
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
FunnyAPI is now open source

download: https://github.com/chrismccoy/funnyapi

Brief description

Quote:
FunnyAPI is a private invite only image API for WordPress.

I decided to develop a backend for various types of images, mostly humor related to be fetched from the WordPress post screen.

I know I could have simply just uploaded images to each WordPress install, but that would give me a migraine, and I thought it would be easier to have one central database that can be parsed via a Plugin.
Some screenshots:












Installation is pretty straight forward.

Quote:
Easy 5 Step install

1. Upload files to your domain root.
2. chmod the pictures and thumbs directory to be writable
3. Create a mysql database to use and import db.sql into the database
4. Edit config.inc.php in the includes/ directory with your domain, and mysql info.
5. Visit yourdomain.com/admin and login with admin/admin
Also you can parse the api outside of WordPress if you need to use it for a 3rd party app.

an example is in the /api directory called apitest.php

Code:
<?php

define("API_URL", "http://www.funnyapi.com/api/search.php?searchby=%s&q=%s&apikey=%s&max_results=%d&thumbsize=%s");
define('API_KEY', '198fe85619b5bb38758b2fcbe1b67cdc1600f63a');

function api_search($q, $by = 'all', $max_results = 16, $thumbsize = '200x200') {
	$api_url = sprintf(API_URL, $by, $q, API_KEY, $max_results, $thumbsize);
	
	$ch = curl_init($api_url);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	
	$json = curl_exec($ch);
	curl_close($ch);
	
	if (stristr(strtolower($json), 'access denied') || stristr(strtolower($json), 'error')) {
		return false;
	} else {
		if (($arr = json_decode($json)) !== FALSE) {
			return $arr;
		} else {
			return false;
		}
	}
}

//$q = (isset($_GET['q']) ? $_GET['q'] : 'unassoc');
$q = $_GET['q'];

if(!$q) die('Missing Parameters!');

$results = api_search($q);

if (is_array($results)) {
	foreach ($results as $idx => $obj) {
		echo '<div style="float: left; margin-left: 5px;"><a href="' . $obj->full_url . '" target="_BLANK" title="' . $obj->title . '"><img alt="' . $obj->description . '" src="' . $obj->full_url . '" /></a><p><strong>Tags:</strong>&nbsp;' . implode(',', $obj->tags) . '</p>';
	}
} else {
	echo 'API Request Failed';
}
?>
If anyone needs any help installing or getting running, let me know, you can also use this for say amateur pics if you have a lot of amateur blogs and you want a central location.

__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-01-2013, 09:56 AM   #2
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,372
bump for anyone that wants to download it, i will even set it up for you no charge
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.