Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Quick PHP Script Vault (open-source)

  1. #1
    Join Date
    Jun 2004
    Posts
    296
    Rep Power
    0

    Lightbulb Quick PHP Script Vault (open-source)

    I know all you php script0rs out there have tons of ideas for projects, even little projects that you just can't find the time to start or research on because of the demands of work, school, etc.

    The hell with all that busy-ness. Yesterday I decided I could't take it any longer I had two ideas for simple quick scripts in my mind that I was itching to just write. They are both pretty small and I decided to share them here. If you have any similarly small scripts that your proud of you can post them here. Should provide an interesting way for other php script0rs to give you feedback on your code. Infact I welcome all criticism of the code I put in this thread. It will only make me better, right?

  2. #2
    Join Date
    Jun 2004
    Posts
    296
    Rep Power
    0

    Default

    First script,

    My stock mailer, i tied it to a cron job that runs at 1:00 pm every day to send me selected stock quotes.

    http://fiwizone.com/alex/stock_mail.php/?source

  3. #3
    Join Date
    Jun 2004
    Posts
    296
    Rep Power
    0

    Default

    Second script,

    Script: http://fiwizone.com/alex/kerry/
    Source: http://fiwizone.com/alex/kerry/?source

    This one is a little but more involved, its a text message logger. I have no idea why I wrote this one. Actually I do know why and its kind of sappy story. I make a habit of writing down all the text messages that my girlfriend sends me. I suppose for sentimental reasons. But I soon found it hard to manage the volume of messages and given my unorganized persona I needed some central deposit for text messages.

    So I came up with this script which allows me to log messages to an xml file. I use an xml library that I created to do this.

  4. #4
    Join Date
    Sep 2004
    Posts
    356
    Rep Power
    0

    Default

    alex you a mad man you write down even the plz call me you girl know seh you advertise har text on the net.

  5. #5
    Join Date
    Jun 2004
    Posts
    296
    Rep Power
    0

    Default

    Quote Originally Posted by MadHacker
    alex you a mad man you write down even the plz call me you girl know seh you advertise har text on the net.
    No my girlfriend doesnt know, I might tell her later. You know the first 'Please call me' she sent me I thought I dont need to write this down but then I said to myself what the heck, now I can have proof to show her at a later date that she sends alot of Please call me's

    Anyways this thread is about php, got any code for us madhacker

  6. #6
    Join Date
    Sep 2004
    Posts
    356
    Rep Power
    0

    Default

    I got this off www.phpfreaks.com it soppose to validate credit cards

    <? function validate_cardnum($cardnum)

    {

    $checkdigit=substr($cardnum,-1);

    $remainingcardnum=substr($cardnum,0,strlen($cardnu m)-1);



    $i=0;



    while($i < strlen($remainingcardnum))

    {

    if($i%2==0)

    $remaing_array[$i]=substr($remainingcardnum,($i+1)*-1,1) * 2;

    else

    $remaing_array[$i]=substr($remainingcardnum,($i+1)*-1,1);



    if($remaing_array[$i]>=10)

    $checksum=$checksum+1;



    $checksum=$checksum+($remaing_array[$i]%10);

    $i++;

    }



    $calculatedcheckdigit=(10-($checksum%10))%10;

    if( $calculatedcheckdigit==$checkdigit)

    return true;

    else

    return false;

    } ?>

  7. #7
    Join Date
    Mar 2004
    Posts
    774
    Rep Power
    0

    Default

    @alexdevmaster - you dont see se your girl number posted? you not afraid mi thief her from you?
    Nickname: Virus
    Occupation: Software Engineer
    Education: B.Sc. Computer Information Science, Asc. Mass Communication, MCSD, MCSE and CCNA

  8. #8
    Join Date
    Apr 2005
    Posts
    104
    Rep Power
    0

    Default

    <?php phpinfo(); ?>

    has got to be the most usefull tidbit

  9. #9
    Join Date
    Apr 2005
    Posts
    104
    Rep Power
    0

    Default

    And now for something usefull...

    First, check out http://www.bigbadbunny.net/mytemp/gddemo.php

    then be sure to check out http://www.bigbadbunny.net/mytemp/gddemo.phps and http://www.bigbadbunny.net/mytemp/gddemo2.phps

    So where does this actualy fit into the scheme of something usable? Think of driving directions, or plotting points on a map.

    http://www.bigbadbunny.net/mytemp/ view the source, add the image tag to your page (make sure the tag links to http://www.bigbadbunny.net/mytemp/) and fill in the latitude and longitude information. See what you get

  10. #10
    Join Date
    Jun 2004
    Posts
    296
    Rep Power
    0

    Default

    Quote Originally Posted by Virus_NCU
    @alexdevmaster - you dont see se your girl number posted? you not afraid mi thief her from you?
    hmm, I never thought about that. I better go take it off. I dont want her getting any harrassing calls and I forgot this is techjamaica. Silly me!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •