Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Well I am looking for a way to use a CGI script on a Invision or PHPBB. The script uses GD to make a picture depending on the user and displays their IP, OS,PORT, etc...... The script gets all the info generates the picture and then forwards the user to the new picture. How could I use this CGI script on a forum oh mighty perl monks? -Mello-
  • Comment on Use a CGI generated picture on a forum?

Replies are listed 'Best First'.
Re: Use a CGI generated picture on a forum?
by thor (Priest) on Dec 15, 2004 at 01:25 UTC
    I've never done it, but all you should have to do is:
    <img src="http://yourdomain.com/your.cgi">
    where your cgi is the one that generates the pic. You'll have to generate the right content type (image/jpeg for instance) and you should be ready to rock.

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

Re: Use a CGI generated picture on a forum?
by jonadab (Parson) on Dec 15, 2004 at 11:30 UTC
    Well I am looking for a way to use a CGI script on a Invision or PHPBB

    To run a CGI script on the bulletin board itself, you'll need admin-level access to the server that the bulletin board is hosted on. I'm guessing if you had that, you wouldn't be asking the question, so the answer is probably "you can't do that".

    However, what you probably can do is set up the script elsewhere and just link to it, the same way you'd link to any other offsite image. Assuming the bulletin board will let you link in an offsite image, all you need is an account with CGI priveges on any web server.

    That's the best I can do without further details about what you want to do. I've never heard of Invision or PHPBB before.


    "In adjectives, with the addition of inflectional endings, a changeable long vowel (Qamets or Tsere) in an open, propretonic syllable will reduce to Vocal Shewa. This type of change occurs when the open, pretonic syllable of the masculine singular adjective becomes propretonic with the addition of inflectional endings."  — Pratico & Van Pelt, BBHG, p68
Re: Use a CGI generated picture on a forum?
by Anonymous Monk on Dec 16, 2004 at 00:16 UTC
    Well I tried doing the thing in using it in IMG tags and it didnt work. It generates a png image and I save it in GD. is there a special way I need to save the cgi or png file for it to work. Oh and yes the forum I will be using it on lets me link to offsite images.
      Use CGI's header function to create the right png header, that's all,I guess! (read CGI's perldoc)

      Well, you should tell the browser not to do a redirection, to stay where it was.

      .{\('v')/}
      _`(___)' __________________________
      Wherever I lay my KNOPPIX disk, a new FREE LINUX nation could be established.
Re: Use a CGI generated picture on a forum?
by Anonymous Monk on Dec 16, 2004 at 12:09 UTC
    Ok that helped alot now I can use it on forums just fine etc.... but now I cant use any of the $ENVs they just appear blank
A reply falls below the community's threshold of quality. You may see it by logging in.