Forums

CALL to a user PHP program

grel4@iol.it 12 Apr, 2015
Bob,
have you just a suggestion or a link to a FAQ showing HOW TO CALL A USER PHP PROGRAM ?
In Chronoconnectivity i have the list of some plants
- Customer1 address1 plant1
- Customer1 address1 plant4
- Customer2 address2 plant2
- Customer3 address3 plant3
I need to print the plant’s booklet (showing some data: power, number of solar panels .....).
I need to call my PHP program with the parameter PLANTn ....
Thanks in advance
Gigi
GreyHead 13 Apr, 2015
Hi Gigi,

Where is your PHP program located? How do you call it? At present this is an unanswerable question?

Normally with PHP Libraries I would include them in a Custom Code action in a form event. This may or may not work with yours.

Bob
grel4@iol.it 13 Apr, 2015
Hi Bob,
I followed this way:
ChronoConnectivity:
in frontlist->settings->columns list the complete list of all fields
in frontlist->settings->view linkable the field where the user can "click" with the column-name = "Print" Plants.id_plant:Print
in frontlist->actions->view –> code I put the following lines:
<?php
$ch = curl_init();
$url_prog='http://www.gascarugate.it/zprova/images/impianti/stampa_scheda.php?impianto='.$row["Plants"]["id_plant"];
curl_setopt($ch, CURLOPT_URL, $url_prog);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>

and is working !
With DOMPDF Library I get the pdf-file that the user can download and print locally.
Many thanks
Gigi
GreyHead 13 Apr, 2015
Hi Gigi,

Looks good to me :-)

Bob
This topic is locked and no more replies can be posted.