Looking for PHP programmer for a small job

Discussion in 'Programming' started by falco85, Nov 1, 2006.

  1. #1
    Hello,
    I am looking for a PHP programmer to do this job for me.

    Basically I am trying to use this free PHP/FLASH chart script:
    http://www.maani.us/charts/index.php

    to chart the following data:
    http://www.euribor.org/html/download/euribor_2006.txt

    I want to have on the Y-axis the quotation for the various interest rates, and on the X-axis the dates.

    Data formatting for such script is well explained there:
    http://www.maani.us/charts/index.php?menu=Tutorial&submenu=Chart_Data



    Someone wrote me this code (for free, thank you!! you know who you are :D) that is able to chart the various interest rates for one day only:

    
    <?php
    include "charts.php";
    $data = file("http://www.euribor.org/html/download/euribor_2006.txt");
    
    $date_array = array("1 WEEK", "2 WEEK", "3 WEEK", "1 MONTH", "2 MONTH", "3 MONTH", "4 MONTH", "5 MONTH", "6 MONTH", "7 MONTH", "8 MONTH", "9 MONTH", "10 MONTH", "11 MONTH", "12 MONTH");
    
    $col = 0;
    foreach ($date_array as $date) {
    $chart [ 'chart_data' ][ $col ][] = $date;
    }
    $col++;
    
    $data_array = explode("\t", $data[2]);
    foreach ($data_array as $data) {
    $tmpdata = str_replace(",", "", $data);
    if (strlen($tmpdata) == 3) { $tmpdata = $tmpdata .'0'; }
    if (strlen($tmpdata) == 2) { $tmpdata = $tmpdata .'00'; }
    $chart [ 'chart_data' ][ $col ][] = $tmpdata;
    }
    
    SendChartData ( $chart ); 
    
    
    ?>
    
    Code (markup):

    I am unable to modify this code to make it work as I want. I'd like also to be able to make charts for a singular kind of interest type only (for instance, the 1 week euribor for all 2006).

    I know it's just one or two lines of PHP code, but I'm very confused when dealing with indexes so I don't want to waste another day!

    I don't know how much to offer for this job since it's very very small. Make me your quotation and I will evaluate it :) Thank you!
     
    falco85, Nov 1, 2006 IP