View Full Version : Take the code
alaios
05-14-2003, 01:48 PM
Hi there ! Here is my new problem!
We have two servers A and B.
I want to run the a.asp page from server A. The a.asp sends a request to server B to run b.asp. The b.asp runs and creates some code.
I want to take the code created by b.asp from B server to a.asp or another asp file in server A.
How i can do this?
arnyinc
05-14-2003, 02:12 PM
Pass the data along with the address and use request.querystring to look it up.
alaios
05-14-2003, 02:14 PM
Can u tell me more than this plz?
1)Pass the data? (HOW?)
2)Query-string?
How much code is it that b.asp generated? Could be to much for the querystring. Also, could be very dangerous to have code that gets executed passed on through the querystring ...
What exacxtly are you trying to do? What sort of app is it? Is it realy necessary to have it done over two machines (cause if b is down, a will also fail)
alaios
05-14-2003, 05:48 PM
The size of code produced by b.asp os undefined.....
The b.asp returns a set of numbers.
I must save this numbers in a database with the help of a.aso into server A.
As you can understand info is stored in server B and we must save it to server A.
Proposals?
well. You can try out arnyinc's suggestion.
At the end of the code from b.asp, you store these number is a variable. And you attach the value to the fileadress when you redirect to page a (response.redirect("fileadress.asp?variable=value") --> run a search on 'querystring' if you need more info). But you'll need to use a seperator between the values.
Also, this is kinda asynchron processing. What will happen on server a while server b processes the file?
I surely would try to get both pages on the same machine or integrate it into one script.
alaios
05-14-2003, 07:23 PM
b.asp is not my page and i cannot change the code.
B.asp can be a page of every site like www.yahoo.com/b.asp
Here is the problem
alaios
05-15-2003, 06:10 AM
Guys my boos wants from to create an asp file which sends requests to other pages such (www.yahoo.com) filters the data and picks up two numbers and store them in our database.¶ So i must send a request from my a.asp page to another page and take to a variable the html text from the size.¶
¶So can you propose something.........¶
¶If i cant do something like that with asp, what i must tell to my boss so he will believe me/?.¶
arnyinc
05-15-2003, 04:36 PM
I think I understand what you're asking now. You need to use xmlhttp or serverxmlhttp, which are very poorly implemented. If you have to go through a proxy server I wouldn't even waste your time trying to get this to work. It's a pain and a security problem since it caches your authentication information.
This following code example will pull all the html from yahoo.com and store it into the variable strScrape. It is then your job to use regular expressions or vbscript functions to pull out the two numbers that you need. Note my three comments.
<html>
<body>
<%
Dim objxmlhttp, strScrape, strURL
strURL = "http://www.yahoo.com"
Set objxmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") 'if createobject fails, search the internet for other versions of serverxmlhttp and xmlhttp
objxmlhttp.Open "GET", strURL, False
objxmlhttp.Send
strScrape = objxmlhttp.responseText
response.write "<xmp>"&strScrape&"</xmp>" 'this prints all the html code
response.write strScrape 'this prints a duplicate of the page
%>
</body>
</html>
alaios
05-15-2003, 05:15 PM
Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx Thanx :) :) :) :) :) :) :) :) :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.