Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: RUN A FILE FROM HTML

by majo (Novice)
on May 14, 2012 at 13:57 UTC ( [id://970433]=note: print w/replies, xml ) Need Help??


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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: RUN A FILE FROM HTML
by marto (Cardinal) on May 14, 2012 at 14:02 UTC

    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.

      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://970433]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-03-28 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found