Thread: printing

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    dover
    Posts
    16
    Rep Power
    0
    how do i include a printed part from a script in a regular HTML page? like, i know how to do it if the file ends in .phtml but how do i get it to work with a regular .html file?
  2. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    I assumed "printed part" is the html output of a script.

    Let say your script accepts GET method, simply try the following...

    <!--#include virtual="script.pl"-->

    To add query string, start here -> http://www.devshed.com/Talk/Forums/F...ML/000255.html
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    dover
    Posts
    16
    Rep Power
    0
    let me try this again. i want to use SSI to include something from a script onto my page but i don't want to have to name my page .shtml. i just want to be able to leave it .htm or .html. how can i do this? this(<!--#include virtual="http://www.lumpkin.nu/track.cgi?odball"--> ) doesn't work.

    [This message has been edited by lumpkin (edited August 04, 2000).]

    [This message has been edited by lumpkin (edited August 04, 2000).]
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    15
    You need to edit/put the .htaccess file in your base web folder that includes this line:

    AddType text/x-server-parsed-html .htm .html

    And entire .htaccess file would look something like this:

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    AddType text/x-server-parsed-html .htm .html

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    [/code]

    This is assuming you have frontpage extensions installed, it will still work if you don't.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    15
    On another note, <!--#include virtual="http://www.lumpkin.nu/track.cgi?odball"--> will never work. You can't include remote files for SSI's. The best way around this is to make a cgi script that calls the remote file and include it (the CGI script) on the page.

    If you need an example script, I can put one up.

    [This message has been edited by JonLed (edited August 04, 2000).]
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    dover
    Posts
    16
    Rep Power
    0
    thanks for you help everyone...hmm, well i guess i've run into a problem though. i've been using cgi/perl to try and make a counter service and it's been turning out pretty good up until now. i wanted to use SSL as the code that people would use to display the counter on their page but i guess this can't be done. i tried all of the stuff above but i can't get it to work. maybe it's just me though. how can i do this? i looked at other counter service's code and it seems that they use script of some kind. what sort of thing can i do so that the user's can display the counter on their page?

    -brandon www.lumpkin.nu
  12. #7
  13. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>i just want to be able to leave it .htm or .html

    You need to get this taken care of in the first place using JonLed's suggestion.

    >>well i guess i've run into a problem though

    But we have no way of knowing what was your problem if you can't even identify the problem.
    Which one?
    1) "An error occured while processing this directive" on your html page
    2) Your SSI tag showed up on your html source page

    >>what sort of thing can i do so that the user's can display the counter on their page?
    Start here -> http://www.scriptsearch.com/pages/l9c6c6.shtml
  14. #8
  15. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    dover
    Posts
    16
    Rep Power
    0
    my problem was the "An error occured while processing this directive" message. i'm not too sure what the error means though. what does it mean? i'm pretty sure i had everything set up right.
  16. #9
  17. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>i'm not too sure what the error means though

    That means your script screwed up somewhere.
    You should test the result using GET method. Do you see 500 internal error if you just type the full URL of your script to browser's location box? If it prints 500 error, of course, your SSI would give you "An error occured while processing this directive".
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2000
    Location
    Indiana
    Posts
    614
    Rep Power
    15
    I assume you're trying to create a counter service where text can be displayed on the person page (from a remote server), with no images involved. This is not possible without having some CGI on the remote server. It's as simple as that. The counters with images just use the "<img src=" call and put in the path to a cgi script (full path) that then generates and image.

IMN logo majestic logo threadwatch logo seochat tools logo