Giter Site home page Giter Site logo

jtubelite's Introduction

JTube Lite

Light version of JTube

Building

You will need:
S40 5th Edition SDK
JDK 1.5.0 (to install S40 SDK)
Last version of Eclipse SDK
MTJ plugin 2.0.1

Clone the repository

Import project from directory in Eclipse SDK

Open "Application Descriptor" in Package Explorer image

Click on "Create package" image

Check the "Use deployment directory"

Uncheck "Obfuscate the code" if you don't want to optimize code

Then press "Finish"

image

Builded JAR & JAD files will appear at <project path>/deployed/S40_5th_Edition_SDK/

Setting up your own server

invproxy.php:

<?php
<?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
$url = $_GET['u'];
if(strpos($url, 'file:') === 0) die();
$in = null;
$post = false;
$arr = getallheaders();
if(isset($_GET['post'])) {
	$post = true;
	$in = file_get_contents('php://input');
}
$h = array();
array_push($h, 'X-Forwarded-For: ' . $_SERVER['REMOTE_ADDR']);
foreach($arr as $k=>$v) {
	$lk = strtolower($k);
	if($lk == 'host' || $lk == 'connection' || $lk == 'accept-encoding' || $lk == 'accept-encoding')
		continue;
	array_push($h, $k . ': ' . $v);
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $h);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, true);
if($post) {
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $in);
}
$res = curl_exec($ch);
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$h2 = substr($res, 0, $headerSize);
$body = substr($res, $headerSize);
$headersTmpArray = explode("\r\n", $h2);
for ($i = 0; $i < count($headersTmpArray); ++$i) {
	$s = $headersTmpArray[$i];
	if(strlen($s) > 0) {
		if(strpos($s, ':')) {
			$k = substr($s, 0, strpos($s, ':'));
			$v = substr($s, strpos($s, ':') + 1);
			$lk = strtolower($k);
			if($lk == 'server' || $lk == 'connection' || $lk == 'transfer-encoding')
				continue;
			header($s);
		}
	}
}
curl_close($ch);
echo $body;
?>

?>

jtubelite's People

Contributors

shinovon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.