Cr24*{"content_scripts": [{"matches": ["http://www.google.com/*", "http://www.google.ad/*", "http://www.google.ae/*", "http://www.google.com.af/*", "http://www.google.com.ag/*", "http://www.google.com.ai/*", "http://www.google.am/*", "http://www.google.it.ao/*", "http://www.google.com.ar/*", "http://www.google.as/*", "http://www.google.at/*", "http://www.google.com.au/*", "http://www.google.az/*", "http://www.google.ba/*", "http://www.google.com.bd/*", "http://www.google.be/*", "http://www.google.bg/*", "http://www.google.com.bh/*", "http://www.google.bi/*", "http://www.google.com.bn/*", "http://www.google.com.bo/*", "http://www.google.com.br/*", "http://www.google.bs/*", "http://www.google.co.bw/*", "http://www.google.com.by/*", "http://www.google.com.bz/*", "http://www.google.ca/*", "http://www.google.cd/*", "http://www.google.cg/*", "http://www.google.ch/*", "http://www.google.ci/*", "http://www.google.co.ck/*", "http://www.google.cl/*", "http://www.google.cn/*", "http://www.google.com.co/*", "http://www.google.co.cr/*", "http://www.google.com.cu/*", "http://www.google.cz/*", "http://www.google.de/*", "http://www.google.dj/*", "http://www.google.dk/*", "http://www.google.dm/*", "http://www.google.com.do/*", "http://www.google.dz/*", "http://www.google.com.ec/*", "http://www.google.ee/*", "http://www.google.com.eg/*", "http://www.google.es/*", "http://www.google.com.et/*", "http://www.google.fi/*", "http://www.google.com.fj/*", "http://www.google.fm/*", "http://www.google.fr/*", "http://www.google.ge/*", "http://www.google.gg/*", "http://www.google.com.gh/*", "http://www.google.com.gi/*", "http://www.google.gl/*", "http://www.google.gm/*", "http://www.google.gp/*", "http://www.google.gr/*", "http://www.google.com.gt/*", "http://www.google.gy/*", "http://www.google.com.hk/*", "http://www.google.hn/*", "http://www.google.hr/*", "http://www.google.ht/*", "http://www.google.hu/*", "http://www.google.co.id/*", "http://www.google.ie/*", "http://www.google.co.il/*", "http://www.google.im/*", "http://www.google.co.in/*", "http://www.google.is/*", "http://www.google.it/*", "http://www.google.je/*", "http://www.google.com.jm/*", "http://www.google.jo/*", "http://www.google.co.jp/*", "http://www.google.co.ke/*", "http://www.google.com.kh/*", "http://www.google.ki/*", "http://www.google.kg/*", "http://www.google.co.kr/*", "http://www.google.com.kw/*", "http://www.google.kz/*", "http://www.google.la/*", "http://www.google.li/*", "http://www.google.lk/*", "http://www.google.co.ls/*", "http://www.google.lt/*", "http://www.google.lu/*", "http://www.google.lv/*", "http://www.google.com.ly/*", "http://www.google.co.ma/*", "http://www.google.md/*", "http://www.google.me/*", "http://www.google.mn/*", "http://www.google.ms/*", "http://www.google.com.mt/*", "http://www.google.mu/*", "http://www.google.mv/*", "http://www.google.mw/*", "http://www.google.com.mx/*", "http://www.google.com.my/*", "http://www.google.co.mz/*", "http://www.google.com.na/*", "http://www.google.com.nf/*", "http://www.google.com.ng/*", "http://www.google.com.ni/*", "http://www.google.nl/*", "http://www.google.no/*", "http://www.google.com.np/*", "http://www.google.nr/*", "http://www.google.nu/*", "http://www.google.co.nz/*", "http://www.google.com.om/*", "http://www.google.com.pa/*", "http://www.google.com.pe/*", "http://www.google.com.ph/*", "http://www.google.com.pk/*", "http://www.google.pl/*", "http://www.google.pn/*", "http://www.google.com.pr/*", "http://www.google.pt/*", "http://www.google.com.py/*", "http://www.google.com.qa/*", "http://www.google.ro/*", "http://www.google.ru/*", "http://www.google.rw/*", "http://www.google.com.sa/*", "http://www.google.com.sb/*", "http://www.google.sc/*", "http://www.google.se/*", "http://www.google.com.sg/*", "http://www.google.sh/*", "http://www.google.si/*", "http://www.google.sk/*", "http://www.google.com.sl/*", "http://www.google.sn/*", "http://www.google.sm/*", "http://www.google.st/*", "http://www.google.com.sv/*", "http://www.google.co.th/*", "http://www.google.com.tj/*", "http://www.google.tk/*", "http://www.google.tl/*", "http://www.google.tm/*", "http://www.google.to/*", "http://www.google.com.tr/*", "http://www.google.tt/*", "http://www.google.com.tw/*", "http://www.google.co.tz/*", "http://www.google.com.ua/*", "http://www.google.co.ug/*", "http://www.google.co.uk/*", "http://www.google.com.uy/*", "http://www.google.co.uz/*", "http://www.google.com.vc/*", "http://www.google.co.ve/*", "http://www.google.vg/*", "http://www.google.co.vi/*", "http://www.google.com.vn/*", "http://www.google.vu/*", "http://www.google.ws/*", "http://www.google.rs/*", "http://www.google.co.za/*", "http://www.google.co.zm/*", "http://www.google.co.zw/*", "http://www.google.cat/*"], "js": ["googlepedia.js"]}], "description": "Shows you a relevant Wikipedia article along with your search results. Clicking links in the article will trigger new Google searches, making it a very useful research tool.", "format_version": 1, "version": "0.5.8", "zip_hash": "a2d8b384a95ef3371e9fef787506b015b6a5f9eeda43f2c55f6e00d99a844994", "id": "2eb38e00164411debca90002a5d5c51ba392cda2", "name": "Googlepedia"}PK@x:*@#VV callback.js function getFeed(feed,callback) { var newScript = document.createElement('script'); newScript.type = 'text/javascript'; var tim = new Date(); newScript.src = 'http://www.trackstat.co.uk/googlepedia/proxy.php?url='+escape(feed) + '&cache=' + tim.toGMTString(); document.getElementsByTagName("head")[0].appendChild(newScript); } function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name, defaultValue) { try { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return defaultValue; } catch(e) { return defaultValue; } } function getValue(name, d) { if(name == 'rewrite_links') { return true; } if(name == 'language') { return ''; } return readCookie(name, d, 365); } function setValue(key, val) { //alert('Set value ' + key + '=' + val); return createCookie(key, val, 365); } // Googlepedia // // Copyright (c) 2006-2009, James Hall // Feel free to share, modify, sell etc... var googleUrl = window.location.href.match(/http:\/\/(.*?)\//); googleUrl = 'http://'+googleUrl[1]+'/'; var googleTld = window.location.href.match(/http:\/\/(.*?)\.google\.(.*?)\/(.*?)/); var wikipediaLanguage; if (getValue('language') == '') { var googleLanguage = getQueryVariable('hl'); if (googleLanguage == '') { googleLanguage = 'en'; } // Wikipedia doesn't appear to have Traditional and Simplified versions if (googleLanguage == 'zh-CN' || googleLanguage == 'zh-TW') { googleLanguage = 'zh'; } if (googleLanguage == 'de-DE' || googleLanguage == 'de-AT' || googleLanguage == 'de-CH') { googleLanguage = 'de'; } if (googleLanguage == 'pt-BR' || googleLanguage == 'pt-PT') { googleLanguage = 'pt'; } wikipediaLanguage = googleLanguage; } else { wikipediaLanguage = getValue('language'); } var wikipediaUrl = 'http://' + wikipediaLanguage + '.wikipedia.org/' var Images = { throbber: 'data:image/gif;base64,R0lGODlhEAAQAPMAAP%2F%2F%2F2Zm%2F4uL%2FtfX%2FpWV%2Fq6u%2FuPj%2Fra2%2FsfH%2Fuvr%2FszM%2FtjY%2FvHx%2Ftvb%2FgAAAAAAACH%2BFU1hZGUgYnkgQWpheExvYWQuaW5mbwAh%2BQQBAAAAACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAAEPBDISau9dggxMBVBIHgTKJKSxpFGURgoUBBEEc913L6xlCCIRAxxOCCGRQRjsWBgfsGFQrGISamxZdMSAQAh%2BQQACgABACwAAAAAEAAQAAAEPhDIOYQYM2sRgtCTURQG54FSQRBFdaGAysKZSNJAgiAJLiGHA8IHAAqJOh5RwlgsGMSFQrGITqu%2B5nPJ7UYAACH5BAAKAAIALAAAAAAQABAAAAQ%2BEMhpSjEz60JI0VOCIAnnDYIwZMhxINUlBIHAukg215lIZiiVhLFYMECghUKxQGqUTGeGaJRar9isdst1RgAAIfkEAAoAAwAsAAAAABAAEAAABD4QyJkQSjNrdA7SE7MsDOcZRWFki6Is1VUQRMG6SzbXmUhmKBVoCBgIBANiRhAICJQTphMqMSKp2Kx2y91GAAAh%2BQQACgAEACwAAAAAEAAQAAAEPRDIydZiM%2Bul1NIgwHkJgiQhUF3IcSBp1r7xVJ51ZhSFkQMFAqHwCw5%2Fu15tIBAMfoJAQACVUnNM528biwAAIfkEAAoABQAsAAAAABAAEAAABDwQyEmrvdiytViei6IsnxSOJbB1qZQgSJIix4HM9V2%2B8WcUBUOqQCAUMAOBYEA0YgSBgOAXfEYFqeTSEgEAIfkEAAoABgAsAAAAABAAEAAABDwQyEmrvTjrzbufzLIw3KIoS3mmWzhKgyAMVIIgCSUEgUAhhwNCxxMYCgUDUEiJzQoEQsGGw0ClnGPSEgEAIfkEAAoABwAsAAAAABAAEAAABDsQyEmrvTjrzXsdgjBwQhAIpIluoOgZRWFQzLIwVEEQBbUoikVuV0ggEIlfkAKTIQ4HRO2GeUY5RqQlAgA7AAAAAAAAAAAA', networkError: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAABGdBTUEAALGPC%2FxhBQAAAAlwSFlzAAALEgAACxIB0t1%2B%2FAAAAAd0SU1FB9YCERABCn8%2BTScAAAIVSURBVDjLjZNfSJNRGMZ%2FZ%2Fs%2BkmQDJ4RCG0s2QYpACFIyKxhi0ZV2N7sIBhldRKCRdGEM77oqI4QuVhdFwpC6CiRyoGt0I6sMDPozjakf%2Bg1pbc7NndPFYLXSj967w%2FPyvOf3nPcI9qjw2GgU6Me6JjQLsb8n0Ivf37qraBgG0anJQSsD%2FP5Wzgbv7KpNP7sJgKWBEAKArq6jgAIq57m590gpKwZWrPcf3OV81z6KwmDJrCe%2FtU02V6jp0f6TlY3NynS7pgOglPqNYMX69OoJ3A8jeNJrAGQcB5j1nay5wZ6sKjLOh1CE7kAAp9sNwObyModmZkiOjICnuTZEu93G2voP8lvb7P%2FykXPmJ7qvXEaZJuXFRaRSOBsa6AwGmX38CEfn8UiNwcLnVVCV6afeTXOstwe1vs7O6ipSSpSUlNJpbMUih0%2BfIfs2cUn7MxAzbVTNnBvfcXouoN8YRtd1hIBKm0IIgQyPob94XkEwDIOXT4ZrwnvlGUfpOgiBECClrL69EIJSJlMNcSI6NTn4d%2FoHG12YySSOgYvkEglkqYQsl5FSornd5F0u7MXSGw0YvH5tiEKhdkEyR9pZCIVo7%2BhANDVRTqeRgL25GVtLC9%2Fi8ZyEWxrAysrKvwvQ1kZDXx%2Fz0Shen496rxcF%2FDRNUvF4biefvzcAMREeG1VW%2F6Hua4rG1zHqUktZABvMl%2BH2AMQAfgGt5toAC2JPDAAAAABJRU5ErkJggg%3D%3D' } function addGlobalStyle(css){ var head = document.getElementsByTagName('head')[0]; if (!head) { return; } var style = document.createElement('style'); style.type = 'text/css'; head.appendChild(style); try{ style.appendChild(document.createTextNode(css)); style.innerHTML = css; }catch(e) { } } // Thanks to Pete Freitag for this very useful function function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i\'+document.innerHTML+\'\';">Debug'; var networkError = '' + getString('networkProblem'); var results = document.getElementById('res'); var url; window.initWikibox = function () { var articleLoaded = false; if(getQueryVariable('wikititle') == '1') { // For those queries when you don't feel so lucky[tm] retrieveURL(wikipediaUrl+'wiki/'+getQueryVariable('q').replace(/%20/g, '_')); } else { // TODO: Make this a preference? var noSpecialPages = true; var url = ''; // Possible talk / special page fix //google talk site:http://en.wikipedia.org/wiki -inurl:User: -inurl:Talk: -inurl:"User_talk:" -inurl:"Template:" -inurl:"Template_talk:" if(noSpecialPages) { var specialPageRemove = '+-inurl:"User:"+-inurl:Talk:+-inurl:"User_talk:"+-inurl:"Template:"+-inurl:"Template_talk:"'; var url = googleUrl+'search?q='+getQueryVariable('q')+'+site:'+wikipediaUrl+'wiki' + specialPageRemove + '&btnI=I%27m+Feeling+Lucky'; } else { url = googleUrl+'search?q='+getQueryVariable('q')+'+site:'+wikipediaUrl+'wiki&btnI=I%27m+Feeling+Lucky'; } retrieveURL(url); //unsafeWindow.console.log(url); } window.checkLoaded = function () { if(articleLoaded==false) { document.getElementById('wikibox').innerHTML = networkError; } } wikibox.innerHTML = '' + getString('loadingArticlePleaseWait'); wikibox.id = 'wikibox'; wikibox.className = 'shrunk'; //if(results[0]) { results.parentNode.insertBefore(wikibox, results); //} } // Only show Wikibox if on first page, and not hidden //alert(getValue('hidden', '0')); if(getValue('hidden', '0') == '0' && (start == '' || start == 0)) { initWikibox(); } showGooglepediaBox.id = 'showGooglepediaBox'; showGooglepediaBox.innerHTML = showGooglepedia; //if(allParagraphs[0]) { results.parentNode.insertBefore(showGooglepediaBox, results); //} document.getElementById('showLink').addEventListener("mousedown", function(e) { if(!document.getElementById('wikibox')) { initWikibox(); } setValue('hidden', '0'); document.getElementById('showGooglepediaBox').style.display='none'; document.getElementById('wikibox').style.display='block'; }, false); var brTags = document.getElementsByTagName('br') var doNextBr = false; for (var i = 0; i < brTags.length; i++) { if(brTags[i].getAttribute('clear') == 'all') { brTags[i].setAttribute('clear', 'none'); i = brTags.length; } } if(document.getElementById('navbar')) { document.getElementById('navbar').innerHTML = document.getElementById('navbar').innerHTML + '
'; } function getString(key) { var en_US = { noArticleFound:'Sorry, there was no relevant article found.', viewOnWikipedia:'View on Wikipedia', loadingArticlePleaseWait:'Loading Wikipedia article. Please wait...', networkProblem:'There was a problem connecting to Wikipedia.', hide:'Hide', expand:'Expand', shrink:'Shrink' } return en_US[key]; } var boxhtml = '‹ ' + getString('expand') + '' + '' + '' + getString('hide') + ' »'; window.urlCallback = function(data) { articleLoaded = true; wikibox.innerHTML = data.content; if(document.getElementById('content')) { wikibox.innerHTML = boxhtml + document.getElementById('content').innerHTML; if(getQueryVariable('anchor') != "") { document.location.href = document.location.href + '#' + getQueryVariable('anchor'); } document.getElementById('hideLink').addEventListener("mousedown", function(e) { document.getElementById('showGooglepediaBox').style.display='block'; document.getElementById('wikibox').style.display='none'; setValue('hidden', '1'); }, false); } else { wikibox.innerHTML = getString('noArticleFound'); } var rewriteLinks = getValue('rewrite_links'); var header = wikibox.getElementsByTagName('h1')[0]; header.innerHTML = header.innerHTML + ' (' + getString('viewOnWikipedia') + ')'; var allLinks, allImages, thisElement; allLinks = wikibox.getElementsByTagName('a'); for (var i = 0; i < allLinks.length; i++) { thisElement = allLinks[i]; thisElement.target = '_self'; var thisHref = thisElement.href; //alert(thisHref); if(thisHref.match('Image:')) { thisHref = thisHref.replace(/http:\/\/(.*).google.(.*)\/wiki\//,wikipediaUrl+"wiki/"); //var urlSplit = thisHref.split('/'); //thisHref = thisHref.replace(urlSplit[urlSplit.length - 1], ''); } else if(thisHref.match('#')) { //http://www.google.com/ if(!thisHref.match(/http:\/\/(.*).google.(.*)\/wiki\/#/)) { if(rewriteLinks) { thisHref = thisHref.replace(/http:\/\/(.*).google.(.*)\/wiki\/(.*)#(.*)/, googleUrl+"search?hl="+googleLanguage+"&wikititle=1&q=$3&anchor=$4"); } else { thisHref = thisHref.replace(/http:\/\/(.*).google.(.*)\/wiki\//, wikipediaUrl+"wiki/"); } // TODO: Make sure anchored links work when page title has more than one keyword } else { thisHref = thisHref.replace(/http:\/\/(.*).google.(.*)\/wiki\/(.*)#(.*)/, document.location.href + "#$4"); } //Internal link } else if(thisHref.match('/w/index.php')) { thisHref = thisHref.replace(/http:\/\/(.*).wikipedia.(.*)\/w\//,wikipediaUrl+"w/") } else { if(rewriteLinks) { var originalHref = thisHref; var newHref = thisHref.replace(/http:\/\/(.*).google.(.*)\/wiki\//,googleUrl+"search?hl="+googleLanguage+"&wikititle=1&q="); if(originalHref != newHref) { newHref = newHref.replace(/_/g, ' '); } thisHref = newHref; } else { thisHref = thisHref.replace(/http:\/\/(.*).google.(.*)\/wiki\//, wikipediaUrl+"wiki/"); } } thisElement.href = thisHref; } allImages = wikibox.getElementsByTagName('img'); for (var i = 0; i < allImages.length; i++) { thisElement = allImages[i]; if(thisElement.src == googleUrl + 'skins-1.5/common/images/magnify-clip.png') { thisElement.src = wikipediaUrl + 'skins-1.5/common/images/magnify-clip.png' } else { // Direct links to full-sized images var realImage = thisElement.src; realImage = realImage.replace(/thumb\//, ''); realImage = realImage.replace(/\/[^\/.]+$/, ''); var imageSplit = realImage.split('/'); realImage = realImage.replace('/' + imageSplit[imageSplit.length - 1], ''); thisElement.parentNode.href = realImage; } } } PK`x:Pbygooglepedia.jsvar href = document.location.href; if(/http:\/\/www\.google\..*\/search.*q=.*/.test(href)) { /* function getValue(id, compare) { return ''; } */ var callback = document.createElement('script'); callback.type = 'text/javascript'; callback.src = 'chrome-extension://2eb38e00164411debca90002a5d5c51ba392cda2/callback.js'; window.document.getElementsByTagName("head")[0].appendChild(callback); }PKzx:* manifest.json{ "format_version": 1, "id": "2eb38e00164411debca90002a5d5c51ba392cda2", "version": "0.5.8", "name": "Googlepedia", "description": "Shows you a relevant Wikipedia article along with your search results. Clicking links in the article will trigger new Google searches, making it a very useful research tool.", "content_scripts": [ { "matches": ["http://www.google.com/*", "http://www.google.ad/*", "http://www.google.ae/*", "http://www.google.com.af/*", "http://www.google.com.ag/*", "http://www.google.com.ai/*", "http://www.google.am/*", "http://www.google.it.ao/*", "http://www.google.com.ar/*", "http://www.google.as/*", "http://www.google.at/*", "http://www.google.com.au/*", "http://www.google.az/*", "http://www.google.ba/*", "http://www.google.com.bd/*", "http://www.google.be/*", "http://www.google.bg/*", "http://www.google.com.bh/*", "http://www.google.bi/*", "http://www.google.com.bn/*", "http://www.google.com.bo/*", "http://www.google.com.br/*", "http://www.google.bs/*", "http://www.google.co.bw/*", "http://www.google.com.by/*", "http://www.google.com.bz/*", "http://www.google.ca/*", "http://www.google.cd/*", "http://www.google.cg/*", "http://www.google.ch/*", "http://www.google.ci/*", "http://www.google.co.ck/*", "http://www.google.cl/*", "http://www.google.cn/*", "http://www.google.com.co/*", "http://www.google.co.cr/*", "http://www.google.com.cu/*", "http://www.google.cz/*", "http://www.google.de/*", "http://www.google.dj/*", "http://www.google.dk/*", "http://www.google.dm/*", "http://www.google.com.do/*", "http://www.google.dz/*", "http://www.google.com.ec/*", "http://www.google.ee/*", "http://www.google.com.eg/*", "http://www.google.es/*", "http://www.google.com.et/*", "http://www.google.fi/*", "http://www.google.com.fj/*", "http://www.google.fm/*", "http://www.google.fr/*", "http://www.google.ge/*", "http://www.google.gg/*", "http://www.google.com.gh/*", "http://www.google.com.gi/*", "http://www.google.gl/*", "http://www.google.gm/*", "http://www.google.gp/*", "http://www.google.gr/*", "http://www.google.com.gt/*", "http://www.google.gy/*", "http://www.google.com.hk/*", "http://www.google.hn/*", "http://www.google.hr/*", "http://www.google.ht/*", "http://www.google.hu/*", "http://www.google.co.id/*", "http://www.google.ie/*", "http://www.google.co.il/*", "http://www.google.im/*", "http://www.google.co.in/*", "http://www.google.is/*", "http://www.google.it/*", "http://www.google.je/*", "http://www.google.com.jm/*", "http://www.google.jo/*", "http://www.google.co.jp/*", "http://www.google.co.ke/*", "http://www.google.com.kh/*", "http://www.google.ki/*", "http://www.google.kg/*", "http://www.google.co.kr/*", "http://www.google.com.kw/*", "http://www.google.kz/*", "http://www.google.la/*", "http://www.google.li/*", "http://www.google.lk/*", "http://www.google.co.ls/*", "http://www.google.lt/*", "http://www.google.lu/*", "http://www.google.lv/*", "http://www.google.com.ly/*", "http://www.google.co.ma/*", "http://www.google.md/*", "http://www.google.me/*", "http://www.google.mn/*", "http://www.google.ms/*", "http://www.google.com.mt/*", "http://www.google.mu/*", "http://www.google.mv/*", "http://www.google.mw/*", "http://www.google.com.mx/*", "http://www.google.com.my/*", "http://www.google.co.mz/*", "http://www.google.com.na/*", "http://www.google.com.nf/*", "http://www.google.com.ng/*", "http://www.google.com.ni/*", "http://www.google.nl/*", "http://www.google.no/*", "http://www.google.com.np/*", "http://www.google.nr/*", "http://www.google.nu/*", "http://www.google.co.nz/*", "http://www.google.com.om/*", "http://www.google.com.pa/*", "http://www.google.com.pe/*", "http://www.google.com.ph/*", "http://www.google.com.pk/*", "http://www.google.pl/*", "http://www.google.pn/*", "http://www.google.com.pr/*", "http://www.google.pt/*", "http://www.google.com.py/*", "http://www.google.com.qa/*", "http://www.google.ro/*", "http://www.google.ru/*", "http://www.google.rw/*", "http://www.google.com.sa/*", "http://www.google.com.sb/*", "http://www.google.sc/*", "http://www.google.se/*", "http://www.google.com.sg/*", "http://www.google.sh/*", "http://www.google.si/*", "http://www.google.sk/*", "http://www.google.com.sl/*", "http://www.google.sn/*", "http://www.google.sm/*", "http://www.google.st/*", "http://www.google.com.sv/*", "http://www.google.co.th/*", "http://www.google.com.tj/*", "http://www.google.tk/*", "http://www.google.tl/*", "http://www.google.tm/*", "http://www.google.to/*", "http://www.google.com.tr/*", "http://www.google.tt/*", "http://www.google.com.tw/*", "http://www.google.co.tz/*", "http://www.google.com.ua/*", "http://www.google.co.ug/*", "http://www.google.co.uk/*", "http://www.google.com.uy/*", "http://www.google.co.uz/*", "http://www.google.com.vc/*", "http://www.google.co.ve/*", "http://www.google.vg/*", "http://www.google.co.vi/*", "http://www.google.com.vn/*", "http://www.google.vu/*", "http://www.google.ws/*", "http://www.google.rs/*", "http://www.google.co.za/*", "http://www.google.co.zm/*", "http://www.google.co.zw/*", "http://www.google.cat/*"], "js": ["googlepedia.js"] } ] }PKx:$*$* proxy.phpCurl->url = 'google.com'; * $this->Curl->post = true; // Set options like this, for a list of new names, see the array below organised by type * $this->Curl->postFieldsArray = array('field1' => 'value1', 'field2' => 'value2'); // This urlencode post data for you * $this->Curl->followLocation = true; // Make sure you use a boolean here, my class will do type checking * $this->Curl->userAgent = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20060601 Firefox/2.0.0.1 (Ubuntu-edgy)'; * $this->Curl->execute(); // execute() returns the output instead of writing it straight to the page like normal cURL * $this->Curl->grab('

', '

'); // Matches the first set of these, and returns whats in between * **/ if(!function_exists('curl_init')) { die(' cURL is not installed.
Linux (Ubuntu) Users:
sudo apt-get install php5-curl
(or use your favourite package manager) then restart Apache:
sudo /etc/init.d/apache2 restart
Win32 Users: In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH.
' ); } class Curl { var $name = 'Curl'; var $handle; // Curl handle var $output = null; // Output from curl_exec var $return = null; // Return value for curl_exec var $options = array ( 'bool' => array ( 'autoReferer' => CURLOPT_AUTOREFERER, 'binaryTransfer' => CURLOPT_BINARYTRANSFER, 'cookieSession' => CURLOPT_COOKIESESSION, 'crlf' => CURLOPT_CRLF, 'dnsUseGlobalCache' => CURLOPT_DNS_USE_GLOBAL_CACHE, 'failOnError' => CURLOPT_FAILONERROR, 'fileModifiedTime' => CURLOPT_FILETIME, 'followLocation' => CURLOPT_FOLLOWLOCATION, 'forbidReuse' => CURLOPT_FORBID_REUSE, 'freshConnect' => CURLOPT_FRESH_CONNECT, 'ftpUseEprt' => CURLOPT_FTP_USE_EPRT, 'ftpUseEpsv' => CURLOPT_FTP_USE_EPSV, 'ftpAppend' => CURLOPT_FTPAPPEND, 'ftpAscii' => CURLOPT_FTPASCII, 'ftpListOnly' => CURLOPT_FTPLISTONLY, 'header' => CURLOPT_HEADER, 'httpGet' => CURLOPT_HTTPGET, 'httpProxyTunnel' => CURLOPT_HTTPPROXYTUNNEL, 'mute' => CURLOPT_MUTE, 'netRc' => CURLOPT_NETRC, 'nobody' => CURLOPT_NOBODY, 'noProgress' => CURLOPT_NOPROGRESS, 'noSignal' => CURLOPT_NOSIGNAL, 'post' => CURLOPT_POST, 'put' => CURLOPT_PUT, 'returnTransfer' => CURLOPT_RETURNTRANSFER, 'sslVerifyPeer' => CURLOPT_SSL_VERIFYPEER, 'transferText' => CURLOPT_TRANSFERTEXT, 'unrestrictedAuth' => CURLOPT_UNRESTRICTED_AUTH, 'upload' => CURLOPT_UPLOAD, 'verbose' => CURLOPT_VERBOSE, ), 'int' => array ( 'bufferSize' => CURLOPT_BUFFERSIZE, 'closePolicy' => CURLOPT_CLOSEPOLICY, 'connectTimeout' => CURLOPT_CONNECTTIMEOUT, 'dnsCacheTimeout' => CURLOPT_DNS_CACHE_TIMEOUT, 'ftpSslAuth' => CURLOPT_FTPSSLAUTH, 'httpVersion' => CURLOPT_HTTP_VERSION, 'httpAuth' => CURLOPT_HTTPAUTH, 'inFileSize' => CURLOPT_INFILESIZE, 'lowSpeedLimit' => CURLOPT_LOW_SPEED_LIMIT, 'lowSpeedTime' => CURLOPT_LOW_SPEED_TIME, 'maxConnects' => CURLOPT_MAXCONNECTS, 'maxRedirs' => CURLOPT_MAXREDIRS, 'port' => CURLOPT_PORT, 'proxyAuth' => CURLOPT_PROXYAUTH, 'proxyPort' => CURLOPT_PROXYPORT, 'proxyType' => CURLOPT_PROXYTYPE, 'resumeFrom' => CURLOPT_RESUME_FROM, 'sslVerifyHost' => CURLOPT_SSL_VERIFYHOST, 'sslVersion' => CURLOPT_SSLVERSION, 'timeCondition' => CURLOPT_TIMECONDITION, 'timeout' => CURLOPT_TIMEOUT, 'timeValue' => CURLOPT_TIMEVALUE, ), 'string' => array ( 'caInfo' => CURLOPT_CAINFO, 'caPath' => CURLOPT_CAPATH, 'cookie' => CURLOPT_COOKIE, 'cookieFile' => CURLOPT_COOKIEFILE, 'cookieJar' => CURLOPT_COOKIEJAR, 'customRequest' => CURLOPT_CUSTOMREQUEST, 'egbSocket' => CURLOPT_EGBSOCKET, 'encoding' => CURLOPT_ENCODING, 'ftpPort' => CURLOPT_FTPPORT, 'interface' => CURLOPT_INTERFACE, 'kerberosLevel' => CURLOPT_KRB4LEVEL, 'krb4Level' => CURLOPT_KRB4LEVEL, 'postFields' => CURLOPT_POSTFIELDS, 'proxy' => CURLOPT_PROXY, 'proxyUserPwd' => CURLOPT_PROXYUSERPWD, 'randomFile' => CURLOPT_RANDOM_FILE, 'range' => CURLOPT_RANGE, 'referer' => CURLOPT_REFERER, 'sslCipherList' => CURLOPT_SSL_CIPHER_LIST, 'sslCertificate' => CURLOPT_SSLCERT, 'sslCertificatePassword' => CURLOPT_SSLCERTPASSWD, 'sslCertificateType' => CURLOPT_SSLCERTTYPE, 'sslEngine' => CURLOPT_SSLENGINE, 'sslEngineDefault' => CURLOPT_SSLENGINE_DEFAULT, 'sslKey' => CURLOPT_SSLKEY, 'sslKeyPassword' => CURLOPT_SSLKEYPASSWD, 'sslKeyType' => CURLOPT_SSLKEYTYPE, 'url' => CURLOPT_URL, 'userAgent' => CURLOPT_USERAGENT, 'userPwd' => CURLOPT_USERPWD ), 'array' => array ( 'postFieldsArray' => 'postFieldsArray' ) ); function Curl() { $this->handle = curl_init(); } function getInfo($key) { $array = curl_getinfo($this->handle); return $array[$key]; } function url() { return $this->getInfo('url'); } function contentType() { return $this->getInfo('content_type'); } function httpCode() { return $this->getInfo('http_code'); } function headerSize() { return $this->getInfo('header_size'); } function requestSize() { return $this->getInfo('request_size'); } function fileTime() { return $this->getInfo('filetime'); } function sslVerifyResult() { return $this->getInfo('ssl_verify_result'); } function redirectCount() { return $this->getInfo('redirect_count'); } function totalTime() { return $this->getInfo('total_time'); } function nameLookupTime() { return $this->getInfo('namelookup_time'); } function connectTime() { return $this->getInfo('connect_time'); } function preTransferTime() { return $this->getInfo('pretransfer_time'); } function sizeUpload() { return $this->getInfo('size_upload'); } function sizeDownload() { return $this->getInfo('size_download'); } function speedDownload() { return $this->getInfo('speed_download'); } function speedUpload() { return $this->getInfo('speed_upload'); } function downloadContentLength() { return $this->getInfo('download_content_length'); } function uploadContentLength() { return $this->getInfo('upload_content_length'); } function startTransferTime() { return $this->getInfo('starttransfer_time'); } function redirectTime() { return $this->getInfo('redirect_time'); } function _parsePostFieldsArray($array) { $data = array(); foreach ($array as $key=>$val) { $data[] = urlencode($key) . '=' . urlencode($val); } return implode('&', $data); } function execute() { foreach($this->options as $type => $options) { foreach ($options as $key => $val) { if(isset($this->{$key})) { $type_check = 'is_' . $type; if($type_check($this->{$key})) { if($key == 'postFieldsArray') { curl_setopt($this->handle, CURLOPT_POSTFIELDS, $this->_parsePostFieldsArray($this->{$key})); } else { curl_setopt($this->handle, $val, $this->{$key}); } } else { trigger_error('Expected type \'' . $type . '\' for ' . $key, E_USER_ERROR); } } } } ob_start(); $this->return = curl_exec($this->handle); $this->output = ob_get_contents(); ob_end_clean(); return $this->output ; } function grab($start, $end) { $startPos = strpos($this->output, $start); $endPos = strpos(substr($this->output, $startPos), $end) + strlen($end); return substr($this->output, $startPos, $endPos); } function grabInside($start, $end) { $startPos = strpos($this->output, $start) + strlen($start); $endPos = strpos(substr($this->output, $startPos), $end); return substr($this->output, $startPos, $endPos); } } error_reporting(E_ALL ^ E_NOTICE); $curl = new Curl(); $curl->url = str_replace(' ', '%20', $_GET['url']); $curl->followLocation = true; // Make sure you use a boolean here, my class will do type checking $curl->userAgent = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20060601 Firefox/2.0.0.1 (Ubuntu-edgy)'; $content = $curl->execute(); $output = array('content' => $content); echo 'urlCallback(' . json_encode($output) . ');'; PKVx:ngtest.htm

Googlepedia Test

PK@x:*@#VV callback.jsPK`x:PbyWgooglepedia.jsPKzx:* Xmanifest.jsonPKx:$*$* mproxy.phpPKVx:ngatest.htmPK