Requesting URL in background

Last post 09-20-2006 4:03 AM by Peter Smith. 6 replies.

Sort Posts:

  • Requesting URL in background

    09-13-2006, 4:42 AM
    • Contributor
      4,290 point Contributor
    • Peter Smith
    • Member since 03-19-2005, 5:58 AM
    • Posts 1,606
    I want to approach an URL without showing it to the end-user.

    For example:
    I want to use the following link which returns a xml file, after this I want to test this xml file on some values and based on that redirect a user to a specific page.
    www.mysite.com/GetID?UserName=3242 

    I dont want this request to be visible to the user.
    How? (preferably without AJAX/Atlas)

    please mark answers as 'Answered' and post back solutions when you figure stuff out that isnt in the post already.
  • Re: Requesting URL in background

    09-13-2006, 9:45 AM
    Answer
    • Contributor
      2,145 point Contributor
    • Speerman
    • Member since 11-05-2004, 7:54 AM
    • Antwerp, Belgium
    • Posts 455

    If the page is located on the same server you can use Server.Transfer, this will change the focus on the server to the new page without changing the address on the client.

    If the page is located elsewhere I don't really know. You could use an full page iframe (although iframes are depricated technique) and load the website in this iframe. Then the client won't see the url in the addressbar (but the address will be visible in the source).

    Why wouldn't you want to show the address to the client ? If it's for security reasons then your approach is just wrong.

  • Re: Requesting URL in background

    09-13-2006, 10:13 AM
    Answer
    • Contributor
      4,290 point Contributor
    • Peter Smith
    • Member since 03-19-2005, 5:58 AM
    • Posts 1,606

    Yes, perhaps some extra info is required...and YES it's for security reasons.

    here's the thing:

    I want user to be able to pay per phone or sms for credits on my website.
    This means the following:
    I send a request (URL) to my sms/phone gateway provider to request a unique code. (invisble to user)
    I show this to the user who then can provide that code by phone or sms to the gateway provider. (show page with code to send/call to user)
    After the user has done this he has to click a button to say he has paid.
    Then I send another request to the gateway provider asking for the status of the payment.(invisble to user)
    I get a response from the gateway provider on the status of the payment (invisble to user)
    if the user has paid I give him his credits.

    How would I then approach this best? and some examples please...:)

    please mark answers as 'Answered' and post back solutions when you figure stuff out that isnt in the post already.
  • Re: Requesting URL in background

    09-16-2006, 4:00 AM
    • Contributor
      4,290 point Contributor
    • Peter Smith
    • Member since 03-19-2005, 5:58 AM
    • Posts 1,606
    Has anyone found the answer to this issue??
    please mark answers as 'Answered' and post back solutions when you figure stuff out that isnt in the post already.
  • Re: Requesting URL in background

    09-16-2006, 10:13 AM
    • Member
      294 point Member
    • flyingfishnm
    • Member since 12-27-2004, 11:08 AM
    • London, England
    • Posts 100

    Hi Peter,

    Check out the following link, this may solve your problem!

    http://aspnet.4guysfromrolla.com/articles/012804-1.aspx

    regards

    Davej

  • Re: Requesting URL in background

    09-19-2006, 7:00 PM
    • Member
      285 point Member
    • Deadpoet
    • Member since 12-13-2005, 10:17 PM
    • Posts 57

    If i understood correctly you just want to access that url sending a code and get an xml as response, if this is correct you should take a look at the classes

    http://msdn2.microsoft.com/en-us/library/system.net.httpwebrequest.aspx

    http://msdn2.microsoft.com/en-us/library/system.net.httpwebresponse.aspx

    you can create web requests from your serverside code and get a webresponse and process the xml document and it'll be abstract to the user.

    hope this helps.

  • Re: Requesting URL in background

    09-20-2006, 4:03 AM
    • Contributor
      4,290 point Contributor
    • Peter Smith
    • Member since 03-19-2005, 5:58 AM
    • Posts 1,606
    That is what I mean, thanks! Do you also know where I can test this? So I send a request, and some server sends a response which I can process?
    please mark answers as 'Answered' and post back solutions when you figure stuff out that isnt in the post already.
Page 1 of 1 (7 items)