1

I've PHP variable which contains some HTML code. For the sake of presentation, let's say the variable contains

// abc.php file
$table =  '<table>';
$table .=    '<tr><td>Hi there!</td></tr>';
$table .=    '<tr><td>How are you</td></tr>';
$table .= '</table>';
echo $table;

I'm planning to run abc.php through a cron job. So is it possible that the output that is to be generated by abc.php be converted into an image and get stored in a folder?

So basically when abc.php is done parsing, an image should be created when the cron job finishes. Is this even possible?

PS : I've looked at Phantomjs which seems ideally designed for such a task, but there are a few problems with it:

(a) It's platform dependent (Windows, Linux, Mac OS etc)

(b) I want to avoid using a .exe file on my server.

Sharun
  • 3,022
  • 6
  • 30
  • 59
asprin
  • 9,579
  • 12
  • 66
  • 119

1 Answers1

0

If you need only tables, it will be easier to you save the output as .xls file, which you'll can include to ppt file when you'll need it.