SitePoint Sponsor |
|
User Tag List
Results 26 to 29 of 29
Thread: Getting Info from other servers
-
Jul 19, 2004, 13:46 #26
Thanks - I think I'm getting the picture. I did wonder how come a server side application could depend on the browser...now I know why I was getting confused if it can be used client side as well!
-
Sep 2, 2004, 06:56 #27
- Join Date
- Sep 2004
- Location
- Belmar, NJ
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I am trying to upload a file on my web server to another website using XMLHTTP. My code logs onto the other website automatically and navigates threw about 4 pages to the file upload screen. If I were trying to post regular form data to the site it would work fine, but I have to some how mimic the <input type=file> box and enctype=”multipart/form-data” parameter of the form within the XMLHTTP post. I am pretty sure I have to turn the file on my server into a binary stream and send it to the website. Does anyone know how to accomplish this?
-
Mar 9, 2005, 13:50 #28
- Join Date
- Jul 2004
- Location
- Nigeria
- Posts
- 1,737
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
This is an excellent resource.
I tried out this script
Set getPage = Server.CreateObject("Microsoft.XMLHTTP" )
getPage.Open "GET", "http://www.GSMTEXT.com/", false
'objXMLHTTP.SetRequestHeader "Content-type", "text/html"
getPage.Send
Response.Write("<h1>Page Code</h1>" & chr(13))
Response.Write(server.HTMLEncode(getPage.responseText) & chr(13))
Set getPage = Nothing
I am wondering, if i do a post using this, how do i get the query string status,
REASON:
I am currently posting to my domain name provider using the response.redirect in ASP however when my provider is down. the url crashes showing my username and password.
How do i get the status.
I also tried this script but keep getting access denied
search = request.querystring("search")
dim http
set http=createObject("Microsoft.XMLHTTP")
http.open "GET","http://www.gsmtext.com/api/sendsms.php?Account=1newday&Username=newday&Password=oewetejhn&Mobile=2348023148807&Message=Credited your account&Sender=Olubenin&RedirectUrl=http://www.1newday.com/welcome/welcome/messages/sms.asp"& search,false
http.send
status = http.status
if status=200 then
document.write "<xmp>"
document.write http.getAllResponseHeaders
document.write "</xmp>"
document.write http.responseText
else
document.write "Error: Status: "& status
end if
-
Jun 30, 2010, 11:35 #29
- Join Date
- Jun 2010
- Posts
- 1
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Just a quick question, is it possible to use xmlhttp to save the dynamically generated SAME PAGE to the server? So that if a page gets loaded with content, can this page be saved as a .txt file using xmlhttp or the FSO?
Bookmarks