in reply to Re^2: RUN A FILE FROM HTML
in thread RUN A FILE FROM HTML

Why would you want to use PHP to execute Perl code? Please take the advice given previously (in this thread) regarding displaying the results of your server side script within a web page.

Update: Also http://http://www.computerhope.com/file.com isn't a valid URL.

Replies are listed 'Best First'.
Re^4: RUN A FILE FROM HTML
by majo (Novice) on May 16, 2012 at 12:55 UTC
    Is there a way of triggering this script on the server from the client side? Thanks
    #!/usr//bin/perl -w use LWP::UserAgent; use Time::HiRes 'time','sleep'; $ua = LWP::UserAgent->new; $request = new HTTP::Request('GET', "http://www.computerhope.com/file. +com"); $start = time( ); $response = $ua->request($request); $end = time( ); $latency = $end - $start; print length($response->as_string( )), " bytes received in $latency s

      Yes, but I already gave you links explaining how create CGI scripts which run on the server side, returning their results to the client. A more complex way would be to use AJAX, jQuery could make that task easier for you, provided this is what you're looking for.