<%@ page import="java.io.BufferedReader, java.io.InputStreamReader, java.io.IOException, java.io.UnsupportedEncodingException, java.net.URL, java.net.URLEncoder, java.util.ArrayList, java.util.List" %> <%! private static final String PAGEAD = "http://pagead2.googlesyndication.com/pagead/ads?"; private void googleAppendUrl(StringBuilder url, String param, String value) throws UnsupportedEncodingException { if (value != null) { String encodedValue = URLEncoder.encode(value, "UTF-8"); url.append("&").append(param).append("=").append(encodedValue); } } private void googleAppendColor(StringBuilder url, String param, String value, long random) { String[] colorArray = value.split(","); url.append("&").append(param).append("=").append( colorArray[(int)(random % colorArray.length)]); } private void googleAppendScreenRes(StringBuilder url, String uaPixels, String xUpDevcapScreenpixels, String xJphoneDisplay) { String screenRes = uaPixels; if (screenRes == null) { screenRes = xUpDevcapScreenpixels; } if (screenRes == null) { screenRes = xJphoneDisplay; } if (screenRes != null) { String[] resArray = screenRes.split("[x,*]"); if (resArray.length == 2) { url.append("&u_w=").append(resArray[0]); url.append("&u_h=").append(resArray[1]); } } } private void googleAppendMuid(StringBuilder url, List muids) { for (String muid : muids) { if (muid != null) { url.append("&muid=").append(muid); return; } } } private void googleAppendViaAndAccept(StringBuilder url, String via, String accept) throws UnsupportedEncodingException { googleAppendUrl(url, "via", via); googleAppendUrl(url, "accept", accept); } %> <% long googleDt = System.currentTimeMillis(); StringBuilder googleAdUrlStr = new StringBuilder(PAGEAD); googleAdUrlStr.append("&client=ca-mb-pub-3633255683884717"); googleAdUrlStr.append("&dt=").append(googleDt); googleAppendUrl(googleAdUrlStr, "ip", request.getRemoteAddr()); googleAdUrlStr.append("&markup=chtml"); googleAdUrlStr.append("&output=chtml"); googleAppendUrl(googleAdUrlStr, "ref", request.getHeader("Referer")); String googleUrl = request.getRequestURL().toString(); if (request.getQueryString() != null) { googleUrl += "?" + request.getQueryString().toString(); } googleAdUrlStr.append("&slotname=2318565341"); googleAppendUrl(googleAdUrlStr, "url", googleUrl); String googleUserAgent = request.getHeader("User-Agent"); googleAppendUrl(googleAdUrlStr, "useragent", googleUserAgent); googleAppendScreenRes(googleAdUrlStr, request.getHeader("UA-pixels"), request.getHeader("x-up-devcap-screenpixels"), request.getHeader("x-jphone-display")); List googleMuids = new ArrayList(); googleMuids.add(request.getHeader("X-DCMGUID")); googleMuids.add(request.getHeader("X-UP-SUBNO")); googleMuids.add(request.getHeader("X-JPHONE_UID")); googleMuids.add(request.getHeader("X-EM-UID")); googleAppendMuid(googleAdUrlStr, googleMuids); if (googleUserAgent == null || googleUserAgent.length() == 0) { googleAppendViaAndAccept(googleAdUrlStr, request.getHeader("Via"), request.getHeader("Accept")); } try { URL googleAdUrl = new URL(googleAdUrlStr.toString()); BufferedReader reader = new BufferedReader( new InputStreamReader(googleAdUrl.openStream(), "AUTO_DETECT")); for (String line; (line = reader.readLine()) != null;) { out.println(line); } } catch (IOException e) {} %>
OMGGhana.Com

James Cameron Reveals ‘Avatar 4′ Details

James Cameron Reveals ‘Avatar 4′ Details

AVATAR 2Despite the fact that second and third “Avatar” films are still years away from hitting theaters, director James Cameron and producer Jon Landau can’t seem to stop talking about “Avatar 4.”

Just last week, Landau told the Courier-Post that while plans are in motion to shoot “Avatar 2″ and “Avatar 3″ back-to-back, “Avatar 4″ won’t happen just yet. That jibed with what Cameron told the New York Times in July about how any “Avatar 4″ discussion was “premature,” but the film was not out of the question.

Now, in a new interview with MTV, Cameron claims he’s got an idea for “Avatar 4.”

“I haven’t really put pen to paper on it, but basically it goes back to the early expeditions of Pandora, and kind of what went wrong with the humans and the Na’vi and what that was like to be an explorer and living in that world,” Cameron said.

Thus, the fourth film would be a possible prequel, with potential for additional prequel features after that.

“We’ll start, not imitating ‘Star Wars,’” Cameron added, “but it’s a logical thing to do because we’ll have completed the thematic arc by the end of three.”

Before any of that, however, “Avatar 2″ has to get made. Cameron has previously stated the sequel probably won’t hit theaters until 2015, at the earliest. Fans still needing that trip to Pandora can pick up “Avatar” on Blu-ray 3D starting on Oct. 16.

For more on Cameron’s plans for “Avatar 4,” head over to MTV.

ADVERTISEMENT