Click to See Complete Forum and Search --> : call another page from my page


esthera
09-12-2005, 01:50 PM
Is there anyway I can have a function hit another page (sort of a redirect) But without the user seeing it being called?

alternatively
can i set a .vbs file to do the same -- execute a page -- like a redirect would
(i need to call the page with the querystring to add it to the db)

any ideas

chrismartz
09-12-2005, 03:11 PM
Do you want to call the page and have it show on that page like a server-side includes?

buntine
09-12-2005, 09:39 PM
Use Server.Execute("yourpage.asp")

Regards.

esthera
09-13-2005, 12:43 AM
thanks... and can I do a server.execute from a .vbs???

Any way to schedule a vbs at say 5 random times within an hour?

russell_g_1
09-14-2005, 02:19 PM
server.transfer might be another way of doing it

esthera
09-15-2005, 08:22 AM
but I don't want it to look like it's going to the other page -- I want it to be like a hit on that page (with the querystring) but without the user knowing...
the server.transfer will take me to that page -- won't it?

russell_g_1
09-15-2005, 08:35 AM
both server.execute and server.transfer will run another asp file on the server without the client knowing about it. the difference is that execution will return to the calling page when you use server.execute and it won't if you use server.transfer.

esthera
09-15-2005, 08:42 AM
it's actually hitting a php script on another server.
i tried server.execute and got the following error:

Server object, ASP 0235 (0x80004005)
Invalid URL form or fully-qualified absolute URL was used. Use relative URLs.

silverbullet24
09-15-2005, 08:56 AM
i don't think you can include the contents of a page on another server (different website) inside your webpage. you'd have to use a frame or iframe or something similiar to accomplish that

esthera
09-15-2005, 09:07 AM
but I want to do it so that noone can determine that i went to the other server.

Is this possible?? any other way??

russell_g_1
09-15-2005, 01:54 PM
use the httpserver object in the msxml component

esthera
09-15-2005, 02:27 PM
i tried that already.

but i get an error error 0x80070008 "not enough
storage is available to process This command

russell_g_1
09-15-2005, 03:00 PM
so if you run the code below does it break every time?

<%

on error resume next

url = "http://www.webdeveloper.com/"



response.write "version 3<br>"
set HttpReq = createobject("MSXML2.serverXMLHTTP.3.0")
HttpReq.open "GET", url, False
HttpReq.send
response.write "statusText = " & httpreq.statusText & "<br>"

if err then
response.write "err = " & err.description
err.clear
end if
response.write "<p>"


response.write "version 4<br>"
set HttpReq = createobject("MSXML2.serverXMLHTTP.4.0")
HttpReq.open "GET", url, False
HttpReq.send
response.write "statusText = " & httpreq.statusText & "<br>"

if err then
response.write "err = " & err.description
err.clear
end if
response.write "<p>"


response.write "version not specified<br>"
set HttpReq = createobject("MSXML2.serverXMLHTTP")
HttpReq.open "GET", url, False
HttpReq.send
response.write "statusText = " & httpreq.statusText & "<br>"

if err then
response.write "err = " & err.description
err.clear
end if


%>

esthera
09-16-2005, 01:28 AM
i get the following: (on this server that it needs to run -- if I try it on a different server then it works)

version 3
err = The data necessary to complete this operation is not yet available.
version 4
err = The data necessary to complete this operation is not yet available.

version not specified
err = The data necessary to complete this operation is not yet available.