SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 29 of 29
  1. #26
    SitePoint Zealot Biffy's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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!

  2. #27
    SitePoint Member
    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?

  3. #28
    Afrika
    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
    And it works just as i would want it to. HOwever, i had to comment line 7. because i throws an error.

    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

  4. #29
    SitePoint Member
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •