Solved

How to run multiple URLs from same ASP file?

Posted on 1998-07-14
7
224 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

776 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