From My Wiki
Jump to navigation Jump to search

        if($_GET["u"] != ""){
                      $url0 = $_GET["u"];
                      $token = '60e91fb601a5ffaa231bb95f6a901ebe';
			$isyoutube = FALSE;
		if(strpos($url0,'') !== false){
			$isyoutube = TRUE;
                      $download = '' . $token . '&url=' . urlencode($url0);
                      $json = file_get_contents($download);
                      $obj = json_decode($json);

                      $text = $obj->{'text'};
                      $title = $obj->{'title'};
                      $url = $obj->{'url'};
<meta charset="utf-8">
<style type="text/css">
  body {
  font-family: Georgia, Times, serif;
     font-size: 16px;
     word-wrap: break-word;
     margin: 90px auto 0px auto;
     padding-botton: 100px;
     position: relative;
     width: 800px;
     line-height: 1.5;
         color: #878787;
p {
display: block;
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
width: 605px;

h1 {
font-family: Georgia, Times, serif;color: #000;
font-size: 24px;
font-weight: normal;padding-bottom: 0;
margin-bottom: 0;
text-rendering: optimizeLegibility;
display: block;
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
width: 605px;
a {
text-decoration: none;
a:link {color:#878787;}      /* unvisited link */
a:visited {color:#878787;}  /* visited link */
a:hover {color:#FF00FF;}  /* mouse over link */
a:active {color:#0000FF;}  /* selected link */

<div align=center>
echo "<h1>";
echo "<a href=\"".$url."\" target=\"_blank\">".$title."</a>";
echo "</h1>";
        print "<p>";
        //print $text;
        //print nl2br($text);
        print str_replace("\n", "</p><p>", $text);
        print "</p>";
	print "<a href=\"".$url."\" target=\"_blank\">[View Original]</a>";
	$a = parse_url(urldecode($url0));
	$b = substr($a["query"],2);
	echo "<div style=\"margin: 50px auto 25px auto; width: 640px;\">";
	echo "<object width=\"640\" height=\"385\"><param name=\"movie\" value=\"";
	echo $b;
	echo "\"></param>
<param name=\"allowFullScreen\" value=\"true\"></param>
<embed src=\"";
	echo $b;
	echo "\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"640\" height=\"385\"></embed></object>";
	echo "</div>";
<?php }else{
      #show normal form
        <form method="get" action="">
              url: <input type="text" name="u" />
                    <input type="submit" value="Submit" />