Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 23rd, 2004, 09:16 AM
Authorized User
 
Join Date: Sep 2004
Location: , , .
Posts: 62
Thanks: 0
Thanked 1 Time in 1 Post
Default GET URL FROM XML POST

Is there any way I can get the actual URL that is attempting to post XML to a page I created. I use the Microsoft.XMLDOM object to load and parse the document but I want to run through a url verification first because different URL's need to take different paths. How can I do this?

  #2 (permalink)  
Old December 23rd, 2004, 10:11 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

You should be able to use Request.ServerVariables("HTTP_REFERER")

HTH,

Chris

  #3 (permalink)  
Old December 23rd, 2004, 11:21 AM
Authorized User
 
Join Date: Sep 2004
Location: , , .
Posts: 62
Thanks: 0
Thanked 1 Time in 1 Post
Default

I tried that and it came up blank, perhaps I have the incorrect syntax? You have an example by any chance?

  #4 (permalink)  
Old December 23rd, 2004, 11:26 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Request.ServerVariables("HTTP_REFERER") should work if you are posting the xml client-side, is this what you are doing, or are you posting server-side?

Please post your code.

Cheers,

Chris

  #5 (permalink)  
Old December 23rd, 2004, 11:31 AM
Authorized User
 
Join Date: Sep 2004
Location: , , .
Posts: 62
Thanks: 0
Thanked 1 Time in 1 Post
Default

I have many different affiliates that are posting the XML to one page in a form value named XML_Post. And I simply load that xml into the parser like so:

Dim bLoaded
Dim xmlObj
set xmlObj = Server.CreateObject("Microsoft.XMLDOM")
xmlObj.async = False
bLoaded = xmlObj.loadxml(XML_post)

If bLoaded = True Then ' It loaded and validated ok, continue..
    set ping_id = xmlObj.selectSingleNode("//XML_doc/session_id")
        'etc
        'etc

However I want to be able to check the URL first as different URL's will be posting some different nodes in their document (amongst other functions I will need to call)

Thanks.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Post a xml file to an URL? chengjianjin XML 10 June 10th, 2010 02:05 AM
How do I post a XML file to an URL using VB? chengjianjin Visual Basic 2005 Basics 3 April 28th, 2008 05:24 AM
Using web request and response to post data to URl cgmenon .NET Framework 1.x 0 July 13th, 2006 10:39 AM
call to url while keep the form post parameters Goldwind Classic ASP Basics 0 December 25th, 2005 01:21 PM
Post XML vrbhatt VS.NET 2002/2003 7 December 5th, 2003 05:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.