Solved

How to run multiple URLs from same ASP file?

Posted on 1998-07-14
7
225 Views
Last Modified: 2013-12-25
I wondered how to open multiple URL sessions from a single ASP file. Is it possible to start more than one URL thread.

Eg. I want to run http://www.Site1.com/x.asp, and I don't care about the response. I also want to run http://www.AnotherSite1.com/y.asp.

Anybody knows?

:-)
0
Comment
Question by:hkp
  • 4
  • 3
7 Comments
 
LVL 28

Expert Comment

by:sybe
ID: 1858550
Have you tried

Response.redirect("http://www.AnotherSite1.com/y.asp")

This only works when x.asp has no output at all.


0
 
LVL 3

Author Comment

by:hkp
ID: 1858551
The solution should be able to send information to more than one URL in the same ASP file. Hence the answer is not the wanted.

I can not make any assumptions about the URLs, except they should be able to take a RequestString.

The file should be able to open multiple sessions like

run http://site1/x1.cgi?p1=a&p2=b
run http://site2/x2.asp?p1=a&p2=b
.
run http://siteN/xM.asp?p1=a&p2=b

Is it possible to do somthing like this in ASP?

0
 
LVL 28

Expert Comment

by:sybe
ID: 1858552
I do not really understand your question, you talk about URL's and ASP-files. And about multiple sessions which need to be opened.

Do you want the result of several scripts to be displayed in one document in the browser ?

The thing is that a url generates an output that will be displayed in a browser document. When the output is HTML, it will BE the document, you can't have more then one HTML document in one HTML document (sounds logical).
But if the output is an image, or just some figures/text which should be included in a document (or even nothing), there might be possibilities.

So please try and explain better what you want.


0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 28

Accepted Solution

by:
sybe earned 150 total points
ID: 1858553
I gave it some thought, and I think I understand what you want now.

The answer is that ASP does not offer additional possibilities then HTML. Those possibilities are:

1. SSI, but that does not work when you want to run scripts from another website. Furthermore the <!-- #exec...--> does NOT work in ASP (as it is an executable itself).

2. The only other option left is to include the other url as an image:
<img src="http://www.site2.com/script.asp?whatever" width="1" height="1" border="0">
This way the other url is called, and will be executed (when the browser has images turned on). The only problem is that the original page expects an image returned. When the code returned is not an image, you'll see the "broken image" image.
But it is not hard to make asp return the code for an image.






0
 
LVL 3

Author Comment

by:hkp
ID: 1858554
What would you do if you should send information to several websites? That's what I want to do.

I will look at your proposal, and perhaps there will be some extra points for a good work.. :-)


0
 
LVL 28

Expert Comment

by:sybe
ID: 1858555
To send info to several websites I would use the image-tag stuff. In fact it is used quite often for visitor counters, using javascript to get stuff like referer:

<script language=javascript>
ref = document.referrer;
document.write("<img src='http://www.whatever.com/asp/webcounter/gifcounter.asp?ref="+ref+"' border=0 width=1 height=1>");
</script>

in which case the asp can store all kinds of info about the visitor into a database.
0
 
LVL 3

Author Comment

by:hkp
ID: 1858556
Broken image? IE 4.01 doesn't show broken image, but does the broken image apply to Netscape's browsers?

You've done a good job for me. Thanks!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question