This was a toss up between this forum and the Java forum...
I have a CGI script, and I want to execute it using the java script code:
Code:<SCRIPT SRC="http://216.74.103.162/cgi-bin/jallwall.pl"></SCRIPT>
This has worked before, but now its not. Here is the CGI file that I'm trying to "convert"
Code:#!/usr/local/bin/perl $random_file = "/home/username/public_html/directory/random.txt"; $delimiter = "\n\%\%\%\%\n"; open(FILE,"$random_file") || &error('open->random_file',$random_file); @FILE = <FILE>; close(FILE); $phrases = join('',@FILE); @phrases = split(/$delimiter/,$phrases); srand(time ^ $$); $phrase = rand(@phrases); print "document.write(Content-type: text/html');\n\n"; print "document.write('$phrases[$phrase]');\n"; exit;
What seems to be the problem here?
Thanks in advance.
PS: If you know of a Java script file that randomly chooses information from an external file, please tell me.
Thanks...




Bookmarks