%
'
' MoFuse Premium API
' Mobile Detect & Redirect
'
DIM sMofuseSiteID
sMofuseSiteID = "ac8334de878cd4755bf6182cb3f3e474"
DIM sMofuseSiteURL
sMofuseSiteURL = "http://grfordlibrarymuseum.bxs.mobi/"
DIM sMofuseParams
MofuseSetParams sMofuseParams, "a", "mobile_detect"
MofuseSetParams sMofuseParams, "v", "0.2.5"
MofuseSetParams sMofuseParams, "s", sMofuseSiteID
MofuseSetParams sMofuseParams, "m", sMofuseSiteURL
MofuseSetParams sMofuseParams, "u", Request.ServerVariables("HTTP_USER_AGENT")
IF Request.ServerVariables("SERVER_PORT") = "80" THEN
MofuseSetParams sMofuseParams, "h", Request.ServerVariables("SERVER_NAME")
ELSE
MofuseSetParams sMofuseParams, "h", Request.ServerVariables("SERVER_NAME") & ":" & Request.ServerVariables("SERVER_PORT")
END IF
MofuseSetParams sMofuseParams, "r", Request.ServerVariables("SCRIPT_NAME")
MofuseSetParams sMofuseParams, "i", Request.ServerVariables("REMOTE_ADDR")
Sub MofuseSetParams(ByRef sParams, sKey, sVal)
IF sVal <> "" THEN
IF sParams <> "" THEN
sParams = sParams & "&" & Server.URLEncode(sKey) & "=" & Server.URLEncode(sVal)
ELSE
sParams = sParams & "?" & Server.URLEncode(sKey) & "=" & Server.URLEncode(sVal)
END IF
END IF
End Sub
FUNCTION MofuseMobileDetectRequest(sParams)
DIM sMofuseMobile
sMofuseMobile = getHTML("http://api.mofusepremium.com/" & sParams)
'Response.Write sMofuseMobile
IF sMofuseMobile <> "" THEN
MofuseMobileDetectRequest = Left(sMofuseMobile, 25)
ELSE
MofuseMobileDetectRequest = "0"
END IF
END FUNCTION
FUNCTION getHTML (strUrl)
'Response.Write strUrl
Set xmlHttp = Server.Createobject("MSXML2.ServerXMLHTTP")
xmlHttp.Open "GET", strUrl, False
xmlHttp.setRequestHeader "User-Agent", "asp httprequest"
xmlHttp.setRequestHeader "content-type", "application/x-www-form-urlencoded"
xmlHttp.Send
getHTML = xmlHttp.responseText
xmlHttp.abort()
set xmlHttp = Nothing
END FUNCTION
SUB MofuseMobileDetect(sParams)
DIM isMobile
isMobile = MofuseMobileDetectRequest(sParams)
'Response.Write isMobile
DIM sMofuseParams
sMofuseParams = ""
IF Request.ServerVariables("SERVER_PORT") = "80" THEN
MofuseSetParams sMofuseParams, "h", Request.ServerVariables("SERVER_NAME")
ELSE
MofuseSetParams sMofuseParams, "h", Request.ServerVariables("SERVER_NAME") & ":" & Request.ServerVariables("SERVER_PORT")
END IF
MofuseSetParams sMofuseParams, "r", Request.ServerVariables("SCRIPT_NAME")
IF isMobile = 1 THEN
Response.Redirect(sMofuseSiteURL & sMofuseParams)
END IF
END SUB
IF Request.QueryString("nomobile") <> "1" THEN
MofuseMobileDetect(sMofuseParams)
END IF
'
' END OF MoFuse Premium API
'
%>
Ron White Biographer on Abraham Lincoln
February 16, 2010, 7:30 p.m.
Mark Updegrove The Presidents and the Cold War
February 25, 2010, 7:30 p.m.
Upcoming exhibit: America and the Cold War (Grand Rapids) January 22 - June 13, 2010
World War II was the most devastating conflict in history with much of Europe and Asia left in ruins at war's end. Yet, there was no peace. The superpowers of the United States and Soviet Union and their ideologies of democracy versus tyranny competed for prominence on the world stage in a cold war. For over 40 years these nuclear superpowers maintained a standoff and avoided a hot war that could have potentially destroyed the planet.
Curator's Favorites
On October 13, 1975 president Gerald R. Ford was presented with a plaque made from pieces of the naval warship the USS Constitution in celebration of the Bicentennial of the United States Navy...