Joshua's Thoughts

webex api php wrapper

Tags: , , , , , ,

i did some work this week with integrating webex into the quickbase website. as a result, i ended up putting together a wrapper for the webex xml api in order to speed up development time.

if you’re going to be using webex with php, check it out.

it doesn’t have full support for all api methods (yet), but if there’s enough interest, perhaps i’ll keep building on it in my “spare” (ha) time.

basic examples of usage here: http://blog.joshuamcginnis.com/2009/04/quickbase-php-api-examples/

seeking windows dev person

Tags: , , ,

are you a windows dev person? would you like to collab on a project involving sonar & arduino? shoot me a comment, e-mail, or twitter: joshuamc

math problems for computer programmers

Tags: , , ,

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

lolcode – the dumbest programming language ever

Tags: , ,

http://lolcode.com/ is a new programming language derived from the lolcats “scene” – if such a thing even exists. ugg.

example:

HAI
CAN HAS STDIO?
VISIBLE “HAI WORLD!”
KTHXBYE

c++ equivalent
#include

int main () {
cout << “HAI WORLD!”;
return 0;
}

How to Pass Arguments to PHP in Command Line

Tags: , , , , ,

I did a little bit of searching this morning for how to pass arguments to php via command line because I was working on setting up a php script to run on a cron in Windows (using WAMP).

It’s actually pretty easy. Say your command line looks like this:

>path-to-php/php.exe path-to-script/script.php

Passing an argument to the php script would look like this:

>path-to-php/php.exe path-to-script/script.php arg1 arg2

PHP will read the arguments using the $argv variable. So in our example, $argv[0] would be the name of the script (script.php), $argv[1] would be arg1 and $argv2[2] would be arg2.

Another example:
>path-to-php/php.exe path-to-script/script.php 15

Say you just wanted to echo out the argument contents:

echo $argv[1];

Pretty cool. Here’s the forum post where I discovered this information.