Powered by slack_rgb

[insert_php]

$ch = curl_init();
/*only show one post */
if(isset($_REQUEST[‘pid’])){
$pid = $_REQUEST[‘pid’];
curl_setopt($ch, CURLOPT_URL,”172.30.65.35//slack/twtwtw/getSlackWebPost.php?pid=$pid”);
}else{
curl_setopt($ch, CURLOPT_URL,”172.30.65.35/slack/twtwtw/getSlackWebPosts.php”);
}

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
//$json = json_encode($output);

$jsonDecode = json_decode($result);

foreach($jsonDecode->items as $item){

$containerHTML = ‘

‘.$item->text.’

‘;

echo $containerHTML;
}
[/insert_php]