How To Get Your Blogs Posts Using Blogger API

30-07-2017 blogger api json php

By using blogger api, we can get all our blogger posts. Every blog has one id, By using below url we can get the posts.

http://www.blogger.com/feeds/blogeer_id/posts/default

Replace blogger id in blogeer_id, In php simplexml_load_file() we can fetch the posts here is code.

<html>
	<head>
		<title>Blogger Api Example</title>
	</head>
	<body>
		<?php
			$blogeer_id = '1234567980481307770';
			$URL = "http://www.blogger.com/feeds/".$blogeer_id."/posts/default";
			$xmlData = simplexml_load_file($URL);
			foreach($xmlData->entry as $postList){
				echo '<div>';
				echo '<h2>'.$postList->title.'</h2>'; // This is post title
				echo '<p>'.$postList->content.'</p>'; // This is post content
				echo '</div>';
				echo '<hr>';
			}
		?>
	</body>
</html>

 

 

 

You might also like:

How to get current date and time (yyyy-mm-dd H:i:s) using javascript
09-03-2017 javascript date time
Filter for change Date Time format (MM-dd-yyyy HH:mm) in Angular Js
05-03-2017 mm-dd-yyyy HH:MM date formats angular js
How to change background color and color to the text using javascript
27-02-2017 css javascript colors
How to set or update or push the values into Object in javacript
27-02-2017 javascript set update push object
Call a function every second or 5 seconds in javascript
22-02-2017 setinterval function calling