New here? Read Greetings Earthling!

PHP Get MIME Type | Windows + *nix Compatible

How To Get MIME Type In PHP

Many methods to do this in PHP ... none works consistently (Windows and such). So I had to create my own. It uses an external file it loads just once per session using a static variable. Each later call uses the static var so no reload. The external file's called mimes.vexp which is an array exported with var_export. The function is below and the file is linked inside the function code (right click - Save As). Use notepad to open/edit it. Put this function within reach as the next function I'll publish uses it.
Read the rest of this entry »

PHP Objects With Case-Insensitive Variables

I really hate it when I create a new stdClass and do this: $obj->Var = 1; echo $obj->var; Notice the V and v. This will fail as class variables are case sensitive and ->var does not exist. Functions are case insensitive in PHP but variables are not ... thing I consider peculiar. I understand case sensitivity (I write C++) but if you remove it from functions remove it from variables also.

I had to create a new object skeleton to handle this problem. I work with a lot of objects (I like them better than arrays most of time) and I'm not always sure of the proper casing of a variable, especially when I get it from elsewhere (a query string ...). So I need both $obj->Var = 1; echo $obj->var; to work the same way.
Read the rest of this entry »

This Is Why I’m A Lone Wolf | Teamwork … no Thanks

Take a look at this image to understand the title. This is what I can't stand about teamwork. One always ends up in the wrong place at the wrong time.

This picture is a teamwork concept ... whoa ... it's gaywork actually.

Teamwork

Partnerships always end up like this:

One gets ahead and the other gives head.

My First jQuery Extension | JavaScript setInterval/clearInterval

I'm a Sunday Javascript-coder. Using my C++ skills and the 'basicest' of JS knowledge I sometimes manage to pull out what I need out of JS. This is my replacement for the setInterval/clearInterval Javascript function pack. I needed something to work in jQuery style ... even if it can be used without. I wanted an object where to stop / start the interval easily and I managed to do it.

It's [probably] not optimal and probably a JS guru would humiliate me with this code but this is it, take it or leave it and enjoy it. Wondering what can be achieved with it? Look on your right at the fading ads. That's what I needed it for. I'll create some nice news tickers too using this.

Read the rest of this entry »

Building On elWpAPI | Extending My Wordpress XMLRPC Class

I need to tell you this. Don't make any change to the actual elWpAPI class. If there's a bug, poke me and I'll fix it but, if you need extra functionality tailored to your needs, always extend the elWpAPI XMLRPC Class.

So, to build your own version, do this. Create a new class myWpAPI and extend the elWpAPI with it.

<?php
require_once('elwapi.php');
class myWpAPI extends elWpAPI{
... your new functions come here ...
};
?>

This is it. When I will make updates you won't need to make changes and alter my code to fit in your updates. Keep it clean and well organized and ejoy it or it could get messy :)

Major Changes To The Site And An Affiliate System

The blog was down for about 30 minutes and I upgraded all the plugins, elib and added a selfmade affiliate system. To access the Affiliate System one must:

  1. Register, if not already registered
  2. Login, if not already logged in
  3. Click the big a$$ banner or the red bottom left link in /wp-admin/

You will need to make a $0.10 donation to Paypal to validate your Paypal E-Mail for payments and once you have validated the E-Mail you will get access to linking structure and reports and so on. Just have mercy and don't flood me with traffic. Do read the Agreement before anything and stay up to date with it proactively. Those who added the Paypal E-Mail to your profile validate it also to be effective.

Upfront commission is 40% of any sale / donation where I get a profit (the $0.10 verification is all taken by Paypal). The Affiliate System already has reports available but I will improve it over time. Right now it just works with no bells and whistles.

Percentage may grow up to 60% based on performance ... this is at my sole discretion.  I won't define the concept of performance until I actually see what affiliates can do.

I'd say the stuff I offer is quite niche and unique and could be promoted by you for the professionals visiting your blogs/sites. Just don't put your hopes up too high due to the staggering amount of freebies and presell everything as I suck at selling stuff.

Wordpress XMLRPC | rSQL [Remote SQL] Addon

This is the second biggest Wordpress XMLRPC Addon provided with the elWpAPI. It's called rSQL [Remote SQL] and it does exactly what is says. It can run SQL queries at a distance and return results. It allows you to do so very much using SQL directly in the database and, combined with the rFC Addon, can do virtually anything.

It gives you access to most of $wpdb functions: get_var, get_col, get_row, get_results, update, insert, escape, query plus several other non-$wpdb functions as I needed them: get_prefix, get_tables, blog_tables, get_db, get_schemas, get_blogs. There's one very cool function [get_blogs] that will return all blog prefixes existing in all databases to allow you to work into another blog from a distance :)
Read the rest of this entry »

Wordpress XMLRPC | rFC [Remote Function Call] Addon

As you have noticed, with the elWpAPI class I also added a plugin which adds some extra functionality to Wordpress XMLRPC. It's time to explain one of those addons and I'll start with rFC [Remote Function Call].

I wrote 5ub.rFC to allow me to execute arbitrary functions on Wordpress through XMLRPC. I also wanted an alternative to the Wordpress XMLRPC and this can do virtually anything ... with more / less code.

To call 5ub.rFC you need to this:

  1. Instantiate a new elWpAPI class $wp = new elWpAPI(xmlrpc, user, pass);
  2. And call: $wp->doRpcRequestUP('5ub.rFC', function_name, [param1, param2]);

As you can see it needs the 5ub.rFC module mentioned, a function name and optional parameters. It can not get easier than this.
Read the rest of this entry »

As Of Today … I’m Oficially Dumber

I'm just too smart and decided to medically dumb myself down a notch, just to fit in :)

So I went to the dentist and had a wisdom tooth removed ... hence I'm less wise.
Read the rest of this entry »

Wordpress XMLRPC API | Change Log

To those who bought the elWpAPI class make sure you subscribe to the comment feed for this new page. Every change I will make to the class will reflect in a new comment added here explaining the new changes. When something new is posted here make sure you get the new code.
Read the rest of this entry »