Exemplo n.º 1
0
$CONSUMER_SECRET = '?';
$ACCESS_TOKEN = '?';
$ACCESS_TOKEN_SECRET = '?';
$username = $argv[1];
$URL = 'https://github.com/' . $username . '.atom';
/*
*
* @param $URL : XML file path
* return : entire XML file
*
*/
function get_XML_file($URL)
{
    $output = file_get_contents($URL);
    return $output;
}
$XML_file = get_XML_file($URL);
$xml = new SimpleXMLElement($XML_file);
$text = $xml->entry[0]->title;
$link = $xml->entry[0]->link['href'];
$final_tweet = '#Github ' . $text . ' > ' . $link . '';
$session = new TwitterOAuth($CONSUMER_KEY, $CONSUMER_SECRET, $ACCESS_TOKEN, $ACCESS_TOKEN_SECRET);
print " [./] .. Sending tweet .. \n";
$session->post('statuses/update', array('status' => "{$final_tweet}"));
print " [./DONE] Tweet sent.";
?>




Exemplo n.º 2
0
<?php

include dirname(__FILE__) . "/header.php";
// validate project name
if (!isset($_GET['axp'])) {
    echo "<br>" . plugin_error_message('Project file not found.');
    exit;
}
$projectFile = '';
$xmlFile = get_XML_file($_GET['axp'], $projectFile);
//-----------------------------------------------------------------------------------------
?>

<link rel="stylesheet" href="../plugins-resources/css/animate-bootstrap-icons.css">

<style>
	.transparent{
		background-color: Transparent;
        background-repeat:no-repeat;
        border: none;
        cursor:default;
        overflow: hidden;
	}
	.popover{
		background-color: rgba(191, 70, 70, 0.33);
	}
	.popover.right .arrow:after {
		  border-right-color: rgba(191, 70, 70, 0.33);
	}
</style>