Publishing a blog post using Blogger Data API
- <?php
- $email = "username@gmail.com";
- $pass = "password for blogspot you use";
- // Do Not Modify Below Code
- $ch = curl_init("https://www.google.com/accounts/ClientLogin?Email=$email&Passwd=$pass&service=blogger&accountType=GOOGLE");
- //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- $token = $arr[3];
- $_SESSION['sessionToken'] = $token;
- }
- $entry = "<entry xmlns='http://www.w3.org/2008/Atom'><title type='text'>My </title><content type='xhtml'> This is my testing contnet </content></entry>";
- $headers = array("Content-type: application/atom+xml","Content-Length: {$len}","Authorization: GoogleLogin auth={$_SESSION['sessionToken']}","$entry");
- //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- echo '<pre>';
- ?>
Hi sir,
ReplyDeletehow to add RSS feed in there?
u can put it? such as $rss or somethin' ...
thanks a lot