예제 #1
0
<?php

require 'functions.php';
?>
<!doctype html>
<html>
<head>
	<title>Twitter w XML</title>
</head>
<body>

<?php 
$xml = getTweetsFromXML_CURL();
echo '<ul>';
foreach ($xml->status as $tweet) {
    echo '<li>' . $tweet->text;
    echo '<strong>' . $tweet->created_at . '</strong>';
    echo '</li>';
}
echo '</ul>';
?>

</body>
</html>
예제 #2
0
<?php

require 'functions.php';
?>
<!doctype html>
<html>
<head>
	<title>Twitter API Demo</title>
	<link rel="stylesheet" href="styles.css">
</head>
<body>

<?php 
$xml = getTweetsFromXML_CURL('laravelphp');
foreach ($xml->status as $tweet) {
    echo '<div class="tweets">' . $tweet->text . '</div>';
}
?>
	
</body>
</html>