ID:184243
Nov 18 2006, 10:05 am
|
|
How do you include a perl script into php? I've tried include() and I can't use virtual() (it's apache only). I'm trying to get the result of a perl script in a table cell on a php file, any help is appreciated. :)
|
In response to Crispy
|
|
I took the exec() solution, and it works just fine, thanks Crispy. In response to what it does, I was using the perl LWP module to check for certain words in a pages contents(Was more of a test to make sure perl works on my websever[Abyss] than anything else, but seemed like a neat idea to incorporate in my index file)
|
I guess you could run the Perl script (using exec) and print out its input from within the PHP script. But you'd either need to turn safe mode off or put the Perl script in a "safe directory" as described on that page I just linked to.
You could also go the other route and use an iframe to embed the contents of the Perl script into the table cell. That's pretty ugly though, and it won't work on browsers that don't support iframes, so I'd call it a last resort.
What does the Perl script do? Is it small enough to re-implement in PHP? That would be the ideal solution.