Write a PHP function that generates a simple PNG image

I need a PHP function that I will use within Wordpress. This PHP function will generate a rectangular (760x450 pixel) PNG file (example attached). The file is a graphical representation of some datapoints. The function will be called with an array of data points and will create a "graph" of those data points appearing on a standard background. The function might use libraries such as described here ( [url removed, login to view] ). The function will be called "save_mood_graph(...)".


Below I show an example of the function and how it might be called from within Wordpress.

<---- Example code snippet below

$my_data_array = array(2,5,1,9,10,8,10,9,2,8,10,8,10);

$my_destination_file = "/tmp/[url removed, login to view]";

save_mood_graph($my_data_array, $my_destination_file); // should generate a PNG in the destination location

function save_mood_graph($data_array, $destination_file)


// Your code here



* The only dynmic part of the graph is the white dots and the white lines between the white dots (see example image). The rest is a static image.

* A maximimum of 13 points can be displayed.

* Horizontal spacing between points is always the same.

* If there are less than 13 points, the left side of the graph will be empty. For example, if there is only one point in the data array, it will appear on the right hand side of the graph.

* All values in the array will always be one of the numbers 1,2,3,4,5,6,7,8,9,10 (it will never be bigger than 10 or smaller than 1)

* If a file already exists in the same location as the $destination_file, go ahead and overwrite

* The example snippet above should create a graph that looks exactly like the example image attached to this work item.

* The code must be valid and callable from within Wordpress. Code will not be accepted until it is called successfully from my wordpress site so I will be asking the developer to put an example function call in my wordpress site to demonstrate that it works.


I have included 2 image examples. The first image shows what the desired output would be. The second image has some explanatory text laid on top to help clarify what I want done.

Beceriler: PHP, WordPress

Daha fazlasını gör: www create a graph, wordpress developer numbers, what is a php developer, what is a graph, what graph to use for data, use a graph, top graph, representation graph, php function for, part of graph, part of a graph, numbers function, need a help to write a will, need a help from wordpress developer, how to write a code in php, how to create graph, how to create a graph, how can i write a, graph top, graph representation of data

İşveren Hakkında:
( 27 değerlendirme ) Mesa, United States

Proje NO: #4244325



I can code a function to generate the image.

%selectedBids___i_period_sub_7% gün içinde 50%project_currencyDetails_sign_sub_9% %project_currencyDetails_code_sub_10%
(24 Değerlendirme)

Bu iş için 12 freelancer ortalamada $98 teklif veriyor


Hi there, We are experts in PHP Open Source (any kind of PHP/MySQL work),wordpress and Ajax/Web 2.0 technology. Some of the projects we completed for php are mentioned below https://www.freelancer.com/projects/ Daha Fazla

in %bids___i_period_sub_35% gün içinde180%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(810 Değerlendirme)

For more details, Please check your PMB.

in %bids___i_period_sub_35% gün içinde100%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(24 Değerlendirme)

Details in private.

in %bids___i_period_sub_35% gün içinde80%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(21 Değerlendirme)


in %bids___i_period_sub_35% gün içinde70%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(29 Değerlendirme)

Dear sir, I have over 10 years of experience in Web Development including PHP, MySQL, Wordpess, etc. I am a Zend Certified PHP Developer (ZCE). I can help you out with your troubles. Cheers!

in %bids___i_period_sub_35% gün içinde80%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(32 Değerlendirme)

Hello, i am a german software developer. I can do this job very fast and provide high quality! thank you!

in %bids___i_period_sub_35% gün içinde50%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(9 Değerlendirme)

please check the pm

in %bids___i_period_sub_35% gün içinde90%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(8 Değerlendirme)

Sounds challenging but doable. Please check PMB for more info

in %bids___i_period_sub_35% gün içinde150%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(11 Değerlendirme)

Hi, I have the experience and ability to perform the services you need, and I will carry them out in a professional and timely manner. For more details,please check your Private Message Box. Thanks and Rega Daha Fazla

in %bids___i_period_sub_35% gün içinde200%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(5 Değerlendirme)

Please check pmb for my further detail

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(5 Değerlendirme)

I understand your need's, it is simple for me. I am new to freelancer but i have 4-5 year of experience.

in %bids___i_period_sub_35% gün içinde60%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)