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.