[PHP-DEV] Graphs and Charts

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default [PHP-DEV] Graphs and Charts

    Hi all,

    It may does not make sense, but I'm writing a web based script in C++
    and now I need to build 3D pie/bar charts. The best solution and quality
    I have found was JpGraph that uses PHP Gd Library / Functions.

    I was thinking about using the PHP source code in my C++ program to
    generate the charts insted of using the main GD code from Boutell -
    because the two versions are different, Boutell's GD doesnt have native
    functions to build 3D images.

    Is it possible to use the PHP Header in my C++ program to use the
    features of GD that exits into PHP ?

    Thanks in advance and sorry if it does not make sense.

    Regards.
    MENDES, Guilherme

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Guilherme A. Mendes Guest

  2. Similar Questions and Discussions

    1. watermark on charts/graphs
      We built a new server to start clean with CF MX 7, used our 30 days, upgraded the license to standard edition and now all our graphs/charts have a...
    2. Flash error when creating charts and graphs
      HI, i was about to try and get the coldfusion graph generator to work so I found this simple script to get a graph showing on the web: But...
    3. ID 2 Graphs and Charts
      We use InDesign version 2 to lay out a daily publication for transmission to clients by fax and email (the emailed version is in PDF format). We also...
    4. Library for creating Charts and Graphs.
      Hi, Does anyone knows where I can find a C/Carbon library for creating Charts and Graphs ? Any help is welcome... Thanks in advance, ...
    5. Charts and Graphs with PHP
      Hello Everyone: I would like to make some charts based on data I am retrieving from my DB. The charts should be things like bar-charts,...
  3. #2

    Default Re: [PHP-DEV] Graphs and Charts

    You should have a look at the gdchart library. There is a PHP extension
    for it in pecl.

    -Rasmus

    On Thu, 30 Oct 2003, Guilherme A. Mendes wrote:
    > Hi all,
    >
    > It may does not make sense, but I'm writing a web based script in C++
    > and now I need to build 3D pie/bar charts. The best solution and quality
    > I have found was JpGraph that uses PHP Gd Library / Functions.
    >
    > I was thinking about using the PHP source code in my C++ program to
    > generate the charts insted of using the main GD code from Boutell -
    > because the two versions are different, Boutell's GD doesnt have native
    > functions to build 3D images.
    >
    > Is it possible to use the PHP Header in my C++ program to use the
    > features of GD that exits into PHP ?
    >
    > Thanks in advance and sorry if it does not make sense.
    >
    > Regards.
    > MENDES, Guilherme
    >
    >
    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Rasmus Lerdorf Guest

  4. #3

    Default Re: [PHP-DEV] Graphs and Charts

    Hi !

    I had the same problem, and i solve it by the use of the 'embed' sapi for PHP.

    Just link you application with it and you will be able to call (not tested
    but should be near ok):

    int run_php_script( const char *script_file ) {
    zend_file_handle file_handle;;
    int argc= 1
    char * argv[]= { "php_embed" };
    int ret;

    file_handle.filename = estrdup(script_file);
    file_handle.type = ZEND_HANDLE_FILENAME;
    file_handle.opened_path = NULL;
    file_handle.free_filename = 0;

    PHP_EMBED_START_BLOCK( argc, argv );
    ret= php_execute_script( file_handle TSRMLS_CC);
    PHP_EMBED_END_BLOCK();

    return ret;
    }

    and then call anywhere in your code:
    run_php_script( "myJpGraphCode.php" );

    Just a problem: all outputs are on stdout !
    But you can buffer the outputs in the php script and write them to a file.

    I hope this will be helpful !

    Eric


    At 20:44 30/10/2003, you wrote:
    >Hi all,
    >
    >It may does not make sense, but I'm writing a web based script in C++
    >and now I need to build 3D pie/bar charts. The best solution and quality
    >I have found was JpGraph that uses PHP Gd Library / Functions.
    >
    >I was thinking about using the PHP source code in my C++ program to
    >generate the charts insted of using the main GD code from Boutell -
    >because the two versions are different, Boutell's GD doesnt have native
    >functions to build 3D images.
    >
    >Is it possible to use the PHP Header in my C++ program to use the
    >features of GD that exits into PHP ?
    >
    >Thanks in advance and sorry if it does not make sense.
    >
    >Regards.
    >MENDES, Guilherme
    >
    >--
    >PHP Internals - PHP Runtime Development Mailing List
    >To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]
    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Eric COLINET Guest

  5. #4

    Default Re: [PHP-DEV] Graphs and Charts

    Eric,

    Thats a good idea. I will try to use your code !
    Thanks.

    ---
    MENDES, Guilherme

    Em Sex, 2003-10-31 ąs 07:15, Eric COLINET escreveu:
    > Hi !
    >
    > I had the same problem, and i solve it by the use of the 'embed' sapi for PHP.
    >
    > Just link you application with it and you will be able to call (not tested
    > but should be near ok):
    >
    > int run_php_script( const char *script_file ) {
    > zend_file_handle file_handle;;
    > int argc= 1
    > char * argv[]= { "php_embed" };
    > int ret;
    >
    > file_handle.filename = estrdup(script_file);
    > file_handle.type = ZEND_HANDLE_FILENAME;
    > file_handle.opened_path = NULL;
    > file_handle.free_filename = 0;
    >
    > PHP_EMBED_START_BLOCK( argc, argv );
    > ret= php_execute_script( file_handle TSRMLS_CC);
    > PHP_EMBED_END_BLOCK();
    >
    > return ret;
    > }
    >
    > and then call anywhere in your code:
    > run_php_script( "myJpGraphCode.php" );
    >
    > Just a problem: all outputs are on stdout !
    > But you can buffer the outputs in the php script and write them to a file.
    >
    > I hope this will be helpful !
    >
    > Eric
    >
    >
    > At 20:44 30/10/2003, you wrote:
    > >Hi all,
    > >
    > >It may does not make sense, but I'm writing a web based script in C++
    > >and now I need to build 3D pie/bar charts. The best solution and quality
    > >I have found was JpGraph that uses PHP Gd Library / Functions.
    > >
    > >I was thinking about using the PHP source code in my C++ program to
    > >generate the charts insted of using the main GD code from Boutell -
    > >because the two versions are different, Boutell's GD doesnt have native
    > >functions to build 3D images.
    > >
    > >Is it possible to use the PHP Header in my C++ program to use the
    > >features of GD that exits into PHP ?
    > >
    > >Thanks in advance and sorry if it does not make sense.
    > >
    > >Regards.
    > >MENDES, Guilherme
    > >
    > >--
    > >PHP Internals - PHP Runtime Development Mailing List
    > >To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]
    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Guilherme A. Mendes Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139