public function testNoErrortrnd() { $nw = new NewWorld(); $toa = $nw->GetAPICon(); $query = array("id" => 1); $this->assertArrayNotHasKey('error', $nw->GetTrendPlace($toa, $query)); }
* User: kongu * Date: 02-Aug-15 * Time: 12:05 AM */ require_once getcwd() . '/twitteroauth/autoload.php'; require_once getcwd() . '/phpInsight-master/autoload.php'; require_once getcwd() . '/NewWorld.php'; use Abraham\TwitterOAuth\TwitterOAuth; #use NewWorld; try { $sentiment = new \PHPInsight\Sentiment(); $nw = new NewWorld(); $toa = $nw->GetAPICon(); $woeid_India = 23424848; $query_India = array("id" => $woeid_India); $results_India = $nw->GetTrendPlace($toa, $query_India); echo '<html><head> <style> @font-face { font-family: moltor; src: url(fonts/Moltorv2i.ttf); } </style> <script type="text/javascript">'; echo "function rawurlencode(str) {\n str = (str + '').toString();\n return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/\\*/g, '%2A');\n }\n function pass(id){\n parent.cht.location.replace('tweet_chrt.php?link='+rawurlencode(document.getElementById(id).value));\n parent.ts.location.replace('tweet_stat.php?link='+rawurlencode(document.getElementById(id).value));\n }\n </script>\n </head><body style=\"height: 100%; margin: 0px;\">"; echo '<table width=100%> <tr> <td><div style="background-image: url("Images/txtr2.jpg");"><a style="font-size: large;font-family: moltor"> Trending in India : </a></div></td> </tr>'; $cnt = 1; foreach ($results_India as $resultw) {
* User: kongu * Date: 01-Aug-15 * Time: 11:36 PM */ require_once getcwd() . '/twitteroauth/autoload.php'; require_once getcwd() . '/phpInsight-master/autoload.php'; require_once getcwd() . '/NewWorld.php'; use Abraham\TwitterOAuth\TwitterOAuth; #use NewWorld; try { $sentiment = new \PHPInsight\Sentiment(); $nw = new NewWorld(); $toa = $nw->GetAPICon(); $woeid_World = 23424977; $query_World = array("id" => $woeid_World); $results_world = $nw->GetTrendPlace($toa, $query_World); echo '<html><head> <style> @font-face { font-family: moltor; src: url(fonts/Moltorv2i.ttf); } </style> <script type="text/javascript">'; echo "function rawurlencode(str) {\n str = (str + '').toString();\n return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/\\*/g, '%2A');\n }\n function pass(id){\n parent.cht.location.replace('tweet_chrt.php?link='+rawurlencode(document.getElementById(id).value));\n parent.ts.location.replace('tweet_stat.php?link='+rawurlencode(document.getElementById(id).value));\n }\n </script>\n </head><body style=\"height: 100%; margin: 0px;\">"; echo '<table width=100%> <tr> <td><div style="background-image: url("Images/txtr2.jpg");"><a style="font-size: large;font-family: moltor"> Trending in USA : </a></div> </td> </tr>'; $cnt = 1; foreach ($results_world as $resultw) {
require_once getcwd() . '/twitteroauth/autoload.php'; require_once getcwd() . '/phpInsight-master/autoload.php'; require_once getcwd() . '/NewWorld.php'; use Abraham\TwitterOAuth\TwitterOAuth; #use NewWorld; try { $sentiment = new \PHPInsight\Sentiment(); $nw = new NewWorld(); $toa = $nw->GetAPICon(); $woeid_World = 1; $woeid_India = 23424848; $woeid_USA = 23424977; $query_World = array("id" => $woeid_World); $query_India = array("id" => $woeid_India); $query_USA = array("id" => $woeid_USA); $results_world = $nw->GetTrendPlace($toa, $query_World); $results_India = $nw->GetTrendPlace($toa, $query_India); $results_USA = $nw->GetTrendPlace($toa, $query_USA); #echo json_encode($results_world); #echo gettype($results_world).'<br><br>'; echo '<html><head></head><body>'; echo '<table width=100%> <tr> <td><a style="color:red;font-size: large"> Trending in World : </a></td> <td> <a style="color:red;font-size: large"> Trending in India : </a></td> <td><a style="color:red;font-size: large"> Trending in USA : </a></td> </tr><tr><td>'; foreach ($results_world as $resultw) { foreach ($resultw->trends as $result) { echo '<br>' . rawurldecode($result->name); }