1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Rep Power
    I am starting to learn perl, and I wrote a program to grap some data (stock values) off some website. It works fine in Unix Command line, but I can't get it to display on the browser. now I understand that I have to put the script in a directory named 'cgi-bin', and I did that, but I still can't get access to it. Can someone help me out?

    I am using phpwebhosting.com BTW, so if anyone using their service can help me out too...

    Thanks in advance....
  2. #2
  3. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    >>but I can't get it to display on the browser
    You need to add this line ->
    print "Content-type: text/htmlnn";
    to display the output to browser

    To grab without storing, start here -> http://www.devshed.com/Talk/Forums/F...ML/000182.html

    To grab with storing, start here -> http://www.devshed.com/Talk/Forums/F...ML/000136.html

    I assume you are using GET method, if you need to use POST method, you then need to use UserAgent.pm.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Frederick,MD USA
    Rep Power
    I don't know if you're running the public html from a unix box, but if you are, check your permission settings by doing 'll' at the command line, and make sure it is executable to the public. it needs to look like this:

    progname.pl -rwxr-xr-x

    if your setting are not like this, try changing the permission:

    chmod a-r-w-x progname.pl <enter>
    chmod u=rwx g=rx o=rx progname.pl<enter>

    If this doesn't work, then you are calling the script wrong from your html code.

IMN logo majestic logo threadwatch logo seochat tools logo