<%@ page import="java.net.*, java.io.*, java.security.*" %> <% final String MOBILE_SITE = "http://mobile.airtakephotos.ie"; // Uncomment the line below to redirect to site specifically for tablets //final String TABLET_SITE = "http://go.mobi?template=tablet"; final boolean DA_USE_COOKIES = true; final boolean DA_USE_CACHE = true; final String DA_CACHE_DIR = System.getProperty("java.io.tmpdir")+ System.getProperty("file.separator")+"DeviceAtlasCache"+System.getProperty("file.separator"); final String DA_URI = "http://detect.deviceatlas.com/query"; final int COOKIE_EXPIRY_TIME = 21600; String source = "none"; String error = ""; String daJson = null; String redirectParam = request.getParameter("redirect"); //If redirect permitted (not explicitly prevented via redirect=false param) if((null!=redirectParam && !redirectParam.equals("false")) || redirectParam==null) { boolean preventRedirect = false; if (DA_USE_COOKIES && null!=getCookieValue("Mobi_Mtld_DA_Prevent_Redirect", request.getCookies())) { //Clear the redirect-prevention cookie if we see redirect=true parameter if(null!=redirectParam && redirectParam.equals("true")) { Cookie cookie = getCookie("Mobi_Mtld_DA_Prevent_Redirect", request.getCookies()); if(null!=cookie) { cookie.setMaxAge(0); //Do we need to add it back to the response like this? response.addCookie(cookie); } } else { preventRedirect = Boolean.parseBoolean(getCookieValue("Mobi_Mtld_DA_Prevent_Redirect", request.getCookies())); //If prevent cookie has value true then stop the redirect if(preventRedirect) { source = "prevent_redirect"; } } } //Grab the user-agent String userAgent = request.getHeader("user-agent"); //Look up cookies if(DA_USE_COOKIES) { daJson = getCookieValue("Mobi_Mtld_DA_Properties", request.getCookies()); if(daJson != null && !daJson.equals("null")) { source = "cookie"; } } //Look up cache if(DA_USE_CACHE && source.equals("none")) { String filename = DA_CACHE_DIR + md5(userAgent) + ".json"; File dir = new File(DA_CACHE_DIR); if(!dir.exists() && !dir.mkdirs()) { error = "Unable to create cache directory: " + DA_CACHE_DIR + "\n"; } else { //Read the cache file if it exists daJson = readFileAsString(filename); if(daJson!=null && !daJson.trim().equals("null") && !daJson.trim().equals("")) source = "cache"; } } //Look up DA webservice if we need to if(source.equals("none")) { URL DA = new URL("http://detect.deviceatlas.com/query?User-Agent=" + URLEncoder.encode(userAgent)); URLConnection conn = DA.openConnection(); BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line = null; line = br.readLine(); while (line != null) { daJson += line; line = br.readLine(); } br.close(); if(null!=daJson) { source = "webservice"; if(DA_USE_COOKIES) { Cookie cookie = new Cookie("Mobi_Mtld_DA_Properties", daJson); response.addCookie(cookie); } if(DA_USE_CACHE) { String filename = DA_CACHE_DIR + md5(userAgent) + ".json"; writeFile(filename, daJson); } } } String isMobile = parseJson(daJson, "mobileDevice"); String isTablet = parseJson(daJson, "isTablet"); //Do the redirect if(!preventRedirect){ if(null!=TABLET_SITE && null!=isTablet && isTablet.equals("true")){ response.sendRedirect(TABLET_SITE); } else if(null!=isMobile && isMobile.equals("true")){ response.sendRedirect(MOBILE_SITE); } } } else { //Create a cookie to prevent redirect for subsequent requests if (DA_USE_COOKIES && null==getCookieValue("Mobi_Mtld_DA_Prevent_Redirect", request.getCookies())) { Cookie cookie = new Cookie("Mobi_Mtld_DA_Prevent_Redirect", "true"); cookie.setMaxAge(COOKIE_EXPIRY_TIME); response.addCookie(cookie); } } %> <%! //Some helper functions //Parse json for property - really basic & assumes flat json file as returned by DA service static final String parseJson(String json, String property) { if(null==json) return null; String[] tokens = json.split(",\\s\"|\":|\\{\"|:\\s|,\\s|\\}"); for(int i=0;i Desktop content!  Home, Aerial Photography in Ireland, Aerial Mast Photography in Ireland, Cork
wp301a48a9.png
wp9ec4ab2d.png
wpd32b6e21_0f.jpg

    © 2012 Air Take Photography

         Mobile 087 9538682 / 086 6023494

 

6023494

       Newmarket, Co Cork

wp355c7df4.png
wp1f0d5a8d_0f.jpg
wpb5e2a7ad_0f.jpg
wpf6f8b10f_0f.jpg
wp9f3e8d97_0f.jpg
wpea3f92be_0f.jpg
wpc5e6e366_0f.jpg
wpc38758b2_0f.jpg

Air Take Photography

Air Take Photography is for people and businesses who need to see the bigger picture.

 

The telescoping mast was specifically designed to provide an efficient, affordable and eco  friendly method of aerial photography

 

 

 

 

 

 

 

 

 

       

 

 

 

 

 

 

 

 

 

 

 

 

Mouse over the mast taken photo below to see the same  property photographed from a ground position

wp1e5cd70b.png

Mast Photography is the new Aerial Photography in Ireland