Previous Thread
Next Thread
Print Thread
Rate Thread
#104531 10/13/2002 7:06 AM
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
deutscher moderator / v5 specialist
Offline
Joined: Dec 2000
Posts: 730
I call a script to generate a sessionID and need it 2 times on this page...

Is there a way to get a result when I call a CGI-script via #include virtual=" ?

TIA
joking

Sponsored Links
#104532 10/13/2002 7:25 AM
Joined: May 2000
Posts: 1,356
Addict
Addict
Joined: May 2000
Posts: 1,356
if it generates a result, then you have to "execute" it... it must be something like this:


#104533 10/13/2002 8:24 AM
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
deutscher moderator / v5 specialist
Offline
Joined: Dec 2000
Posts: 730
I tried this code:

Code
<!--#set var="sid" value="<!--#exec cgi="script.cgi" -->" -->
it dosen't work. what is wrong? I try to set a sessionID in the var sid...

#104534 10/13/2002 8:29 AM
Joined: May 2000
Posts: 1,356
Addict
Addict
Joined: May 2000
Posts: 1,356
umm... what do you actually want to do?

#104535 10/13/2002 8:40 AM
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
deutscher moderator / v5 specialist
Offline
Joined: Dec 2000
Posts: 730
I have now 2 Refresh vai meta-Tags and I'm looking for a way to do this in one step.
  1. the User call index.html
  2. this Document forward the User to the part of the Script which generate the sessionID
  3. after this the User will be forward to the UBB
I'm looking for a way to generate the sessionID (and add it to the Database) when the User call the index.shtml...

Sponsored Links
#104536 10/13/2002 9:27 AM
Joined: May 2000
Posts: 1,356
Addict
Addict
Joined: May 2000
Posts: 1,356
if I understand you correctly, js can solve yolur problem smile

j.cgi:
Quote
code:
Code
#!/usr/bin/perl -w
use strict;

my $SID = time;

write_to_db($SID);

print <<SES;

function SID () {
return "$SID";
}

SES


sub write_to_db {
# blah blah blah
}

j.html:
code:
[qb]
Code
<html>
<head>
<script type="text/javascript" src="j.cgi"></script>
</head>

<body>

<script type="text/javascript">
var SID = SID();
document.write("SESSION ID: "+SID);
</script>

</body>
</html>
[/qb]

#104537 10/13/2002 9:58 AM
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
deutscher moderator / v5 specialist
Offline
Joined: Dec 2000
Posts: 730
can I solve this problem without js?

#104538 10/13/2002 10:13 AM
Joined: May 2000
Posts: 1,356
Addict
Addict
Joined: May 2000
Posts: 1,356
ok... try the exec code wtihout the set var stuff...

like:

Code
<b>SESSION ID IS <!--#exec cgi="script.cgi" --></b>
etc... if it fails, use js...

#104539 10/13/2002 10:37 AM
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
deutscher moderator / v5 specialist
Offline
Joined: Dec 2000
Posts: 730
Can I save the result of exec without js in a var?

#104540 10/13/2002 11:13 AM
Joined: May 2000
Posts: 1,356
Addict
Addict
Joined: May 2000
Posts: 1,356
in a what 'var'? you can not create a variable with html...

Sponsored Links
#104541 10/13/2002 11:16 AM
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
deutscher moderator / v5 specialist
Offline
Joined: Dec 2000
Posts: 730
i mean in a SSI var...

#104542 10/13/2002 11:25 AM
Joined: May 2000
Posts: 1,356
Addict
Addict
Joined: May 2000
Posts: 1,356
hmm... You can not do a ssi call inside a ssi call AFAIK... First you set a variable, then exec the cgi and you can access this var inside this cgi...

#104543 10/14/2002 3:26 PM
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
deutscher moderator / v5 specialist
Offline
Joined: Dec 2000
Posts: 730
Thanks. I solved the problem.

#104544 10/15/2002 8:04 AM
Joined: May 2000
Posts: 1,356
Addict
Addict
Joined: May 2000
Posts: 1,356
How? smile If you write it here, it will be good for a future refence...

#104545 10/15/2002 8:12 AM
Joined: Dec 2000
Posts: 730
deutscher moderator / v5 specialist
deutscher moderator / v5 specialist
Offline
Joined: Dec 2000
Posts: 730
I call in every link.
the first link is a the refresh-meta and the second link is for non javascript user.
i see no other way without js...


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)