Stephen Groom's Blog

Friends:

Youtube Favourite

Asian Drum Solo TRAVIS BARKER

I just quickly added more articles on the main page as I thought it worked better than 2.

Comments??

30th June 2008 at 11:50pm | Site Updates | 0 comments | [Link] | Digg! DelIcioUs

Hello,

I just thought I'd post a new blog to let you know I haven't disappeared and that this site is still alive. I've been doing alot of stuff aside from playing the internetz atm so bear with me on this project. So far I have got:

Buying cars
Visiting other peoples garages
Formulas for car statistics
Shell of a race track (working on this as we speak)

I know it seems like this is moving along very slowly but in the last like.. 30 minutes?? I have done more work than previously on the whole project. This gives a good idea of how much of my time I have been dedicating to it Tongue

Also, I will mention, I got myself some factory work for over the summer to earn myself a few pennies and thus will be away from my PC more than usual. This may mean a few weeds start growing around this blog as it becomes untended but please don't stop visiting as I will keep it updated as often as I can.

Thanks
Stephen

30th June 2008 at 11:48pm | PHP | 0 comments | [Link] | Digg! DelIcioUs

Progress Smile

As some of you may already know, I am in the progress of coding a facebook application based around the idea of car tuning and drag racing. Currently I have coded most of the functionality of the application except the ability to race. Smile

I need some help from you guys though, if you can. I am in need of a formula that gives 0-60, 0-100, 1/4 and 1/8 mile times based on weight and bhp. The fomulas I have currently are working, but aren't as accurate to real life as I'd like them to be.

I say that this app would only take another full day's work to complete. In reality this means it will be done over the next few weeks a little bit at a time Big Grin

I would really appreciate it if some of you guys could help me to test the application by playing it over on facebook

Cheers
Groomi Smile

17th June 2008 at 7:39am | PHP | 1 comments | [Link] | Digg! DelIcioUs

I have recently started to make my first Facebook application. I am not giving too much away at the moment but it will be coded in PHP and based around the theme of car tuning and drag racing. I am guessing that this will be playable within a month but I aim to constantly update it to create a game with limitless playability unlike most I have played on Facebook. For anyone that is interested in adding the application it is available at Drag Racer but it will continue to be modified and the database cleared out regularly until it is ready for release.

Please feel free to try it as it would help me find bugs and errors if I had some real users.

Thanks
Stephen

9th June 2008 at 12:02pm | PHP | 0 comments | [Link] | Digg! DelIcioUs

While having a trawl around my local sites folder looking for something of use to the world wide web I remembered my MySQL class that has gone unedited for a long time but has been used by every site I have made since I upgraded to PHP5.

It contains very little in the way of functionality but I use it to save the trouble of typing out mysql functions for each operation. It is called using

PHP:


$mysql=new mysql('HOST', USERNAME', 'PASSWORD', 'DATABASE');




It also contains the following functions

PHP:


<?php

$mysql
->Close(); //close connection

$mysql->Free($RESULT_SET//call to mysql_free_result();

$mysql->Query($query); //Query with basic error handling

$mysql->FetchArray($RESULT_SET); //Fetch array from a result set

$mysql->NumRows($RESULT_SET); //Get number of rows in a result set

$mysql->QueryArray($query//Used to query AND return the result as an array

?>



Here is the class as it stands:

PHP:



<?php

class mysql {

    var 
$server;

    var 
$user;

    var 
$passwd;

    var 
$dbname;

    var 
$link//MySQL link identifier

    
var $rs//Result set

    
var $q;  //Number of queries

    

    
function mysql ($server 'localhost'$user 'root'$pass ''$dbname '') {

        
$this->server $server;

        
$this->user $user;

        
$this->passwd $pass;

        
$this->dbname $dbname;

        

        
$this->connect ();

    }



    function 
Connect () {

        
$this->link mysql_connect ($this->server$this->user$this->passwd);

        
mysql_select_db ($this->dbname$this->link);

    }

    function 
Close () {

        return (
mysql_close($this->link));    

    } 

    function 
Free($rs '')

    {

        if (
is_resource($rs))

            
mysql_free_result($rs);

    }

    function 
Query($query) {

        
$this->rs mysql_query ($query$this->link);

        if (!
$this->rs)

        {

            echo(
'Error: Invalid query "'.$query.'"...<br/>');

            echo(
'Error: '.mysql_errno().'<br/>');

            echo(
'Error: '.mysql_error().'<br/>');

        } else {

            
$this->q++;

            return (
$this->rs);

        }

    }

    

    function 
FetchArray($rs '') {

        if (
$rs == '')

            
$rs $this->rs;

        



        return (
mysql_fetch_assoc ($rs));

    }

    

    function 
NumRows($rs '') {

        if (
$rs == '')

            
$rs $this->rs;

        return (
mysql_num_rows($rs));

    }

    function 
QueryArray($rs ''){

        if(
$rs =='')

            return 
0;

        
$rs=$this->Query($rs);

        
$this->q++;

        
$array=$this->FetchArray($rs);

        
$this->Free($rs);

        return 
$array;

    }

}

?>




and here is a link to the current source which I use on this website.

Love
Stephen Smile

3rd June 2008 at 10:25pm | PHP | 0 comments | [Link] | Digg! DelIcioUs

Valid XHTML 1.1RSS Feed Sitemap

x

Admin Login

Username

Password