<!--#include virtual="http://www.site.com/script.cgi"-->

<!--#include virtual="/script.cgi"-->
works fine, but


<!--#include virtual="http://www.site.com/script.cgi"-->
doesn't work.
How can I insert output from CGI script to HTML page? Path must start from "http://  "
LVL 2
serg111Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jhurstCommented:
you can't in such a simple manner.  include is a command to include a file, not to execute a command and get the results.

You will need to create some code that actually accesses thhe web pages that you need.  If this was perl you could use LWP and then get(), in other languages this will be a little more complex.

I realize that this is not what you want to hear.  Sorry.  But it is the answer.
0
serg111Author Commented:
It is comment, not an answer.
0
ndnetCommented:
Don't use http://. You must use a unix path, like /server1/mydir/cgi/blah.cgi

ex)
<\!--\#include virtual=\"\/myndnet\/aeiptips.txt\" -->

An SSI cannot be made to another server directly, but a CGI script can be used to create a bridge.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

serg111Author Commented:
Not answer
0
jhurstCommented:
What languages are available to you?  You see, you keep rejecting answers that tell you what is possible and what is not.  Without some type of coding in your script that actually does the work, not just an include, you can not do what you want.

NO is an answer!

You may not like it, but it is.  Now, if you want to somehow do some coding, in perl, c, or whatever is available to you, then you can get the page you want and insert its contents.  Otherwise, the answer is no.
0
lorentgCommented:
jhurst's answer that you rejected is an answer.  You are like a child who does not accept NO.  I needed to do something like this and jhurst actually gave me some perl code that allowed me to get a page from elesewhere and extract some of its contents and then insert them into my page, as generated.
0
serg111Author Commented:
Mr. lorentg posted answer same to answer from previous expert and probably expects that for secodn try it will be accepted.

0
ndnetCommented:
serg111,

Simply put, you are being fairly stubborn.

You really aren't giving us enough info.

First, are you trying to SSI something on another server or not? If you are trying to grab something directly from another server, you will need to use a frame/iframe solution or a gateway cgi script. This is just a fact of life.

Second, why are you rejecting perl cgi solutions? If you have no perl experience, one of us will give you code.

This code should work. Just save the contents BETWEEN the two asterik lines as grab.cgi, replace the variables as needed check the first line to your perl interpreter!!!), and upload to your server. Then just access this via SSI.

**************************************Beginning
#!/usr/local/bin/perl
# This script will grab a file or CGI output on another server.
use LWP::Simple;
####VARIABLES
$url = "http://www.site.com/script.cgi";
####END VARIABLES

$output = get($url) or do
  {
    # Trouble fetching file from server.. !!
    print "Can't get file from the server." ;
    exit (0) ;
  } ;
@document = split /\n/, $document;
print "$output";
**************************************end

if this doesn't work, tell me the error message you recieve.
0
serg111Author Commented:
I would like to run it on client side so server will not be overloaded. And I can insert image or soung to my html page like <img src="http://.....>
<embed sound....>
Is it possible to get text file or cgi output from other server and insert it in page?
0
ndnetCommented:
The sound and image would work fine

While server overload would not be that great, you could use iframes. I'm not much of an expert on them, but here's what I know:

1) They are the equivalent of SSI on the client side.
2) Not completely sure, but I think they only work in IE.

I'd like to be able to offer a better solution, but there isn't anything better. You might be able to rig up an ASP solution, but that's still server side. A java solution would be too slow. There's no mechanism for what you need other than Iframe, unless you're willing to take a probably slight performance hit on the server.

Again, sorry.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
serg111Author Commented:
The solutioin was to use <IFRAME> tag
0
lorentgCommented:
No, I was not expecting the credit of the points.  serg111, you may try this type of think since you have attempted to cheat and trick others out of an answer for no points.  I do not operate that way.

You should give the points to jhurst, as is the right and correct thing.  Then you should post your new question and give points to whoever desires to answer it.  If they can.

People like you ruin this area for us all.  

Do the right thing - and stop ascribing your low motives to others.
0
jhack77Commented:
well said
0
jhurstCommented:
sort of a conflict for me here but I must say that I agree with jhack and lorentg.

I have sent a copy of the thing with a complaint to experts-exchange, in the hope that they can somehow discourage this type of activity by serg111 in the future.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.