Is there a better way? (perl in PHP)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mr. M.J. Lush

    Is there a better way? (perl in PHP)


    Is there a better way of doing this?

    I want to take in a large amount of text/data, process it with a perl script
    then print the results to the browser

    <?php
    $tmpfname = tempnam ("/tmp", "FOO");
    $fp = fopen($tmpfname , "w");
    fwrite($fp, $text_in);
    fclose($fp);
    if (isset($alias)) {
    $file = `perl /home/httpd/cgi-bin/perl_script.pl $tmpfname`;
    unlink($tmpfnam e);
    print"$file";
    ?>

    The load on the site is very low


    --

    Michael
    ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~
    NPC rights activist | Nameless Abominations are people too.
Working...