SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot Imran-Saami's Avatar
    Join Date
    Sep 2004
    Location
    Pakistan-Dubai
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sharing Data among pages on Different Domains using serverXMLHTTP

    Hi All

    I'm including the output of an .asp page hosted on other domain using
    serverXMLHTTP.
    Is it possible that I can share the values of some variables from external file.
    Like session or others like (suppose..)

    TablesBGColor = "#FFG445"
    TableHieght = "600"
    session("ImagesFolder") = "http://www.SiteABC/_images/"

    If i include the settings.asp file on the top of my asp page then How can i use
    the above mentioned variables/values down in my own ASP page.

    Thanks in Advance

  2. #2
    SitePoint Evangelist
    Join Date
    Sep 2003
    Location
    San Diego, CA
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could possibly try something like this...

    domain1/sharepage.asp (Page/Site you need vars from)
    Code:
    [sessionUsersonline]<%=session("uonline")%>[/sessionUsersonline]
    domain2/getpage.asp (Page/Site you are getting the vars for)
    Code:
    Function ReturnDataFromBetween(byVal strString, byVal strStart, byVal strEnd)
    	Dim intStart, intLength
    	If InStr(strString, strStart) > 0 AND strStart <> "" Then
    		intStart = InStr(strString, strStart) + LEN(strStart)
    		intLength = InStr(intStart, strString, strEnd) - intStart
    		ReturnDataFromBetween = Trim(MID(strString, intStart, intLength))
    	End If
    End Function
    
    
    'your XMLHTTP function calling domain1/sharepage.asp
    
    'lets say the html returned from XMLHTTP is in a var called htmlData
    
    sessionUsersonline=ReturnDataFromBetween(htmlData,"[sessionUsersonline]","[/sessionUsersonline]")
    Something like that might work...


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
  •