Auto post into Blogspot using php code?

$email = “blogger_email@gmail.com”;
$pass = “password”;
$blogID= urlencode(“blogger_id”); // like 6304924319904337556

// Do Not Modify Below Code
if(!isset($_SESSION[‘sessionToken’])) {

$ch = curl_init(“https://www.google.com/accounts/ClientLogin?Email=$email&Passwd=$pass&service=blogger&accountType=GOOGLE”);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1);
curl_setopt($ch, CURLOPT_HEADER,0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1);
$result = curl_exec($ch);
$resultArray = curl_getinfo($ch);
curl_close($ch);
$arr = explode(“=”,$result);
$token = $arr[3];
$_SESSION[‘sessionToken’] = $token;
}

$entry = “

Title of blog post

This is testing contnetto post in blog post.

”;

$len = strlen($entry);

$headers = array(“Content-type: application/atom+xml”,”Content-Length: {$len}”,”Authorization: GoogleLogin auth={$_SESSION[‘sessionToken’]}”,”$entry”);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, “https://www.blogger.com/feeds/$blogID/posts/default”);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);
curl_setopt($ch, CURLOPT_POST, true);
$result = curl_exec($ch);
$ERROR_CODE = curl_getinfo($ch);
curl_close($ch);

echo ‘

’;

    print_r($headers);

    var_dump($result);

    print_r($ERROR_CODE);

    exit;
 

    ?>
  1. February 5, 2010 at 4:46 PM

    Find the Best Deals. Shop for online casino gambling now.
    compulsive gambling facts

    Shop and compare great deals on grand online casino and other related products
    tropicana casino resort

  2. June 6, 2011 at 1:16 PM

    Good article. Very useful info.

  3. May 26, 2012 at 10:34 PM

    how to use this script

  4. June 29, 2013 at 11:00 PM

    You need to be a part of a contest for one of the most useful blogs on
    the web. I am going to recommend this web site!

  5. July 4, 2013 at 5:34 AM

    I am not sure where you are getting your info,
    but good topic. I needs to spend some time learning more or
    understanding more. Thanks for fantastic information I was looking for this
    information for my mission.

  6. July 27, 2013 at 3:24 AM

    It’s not my first time to pay a visit this web page, i am visiting this website dailly and obtain fastidious facts from here all the time.

  7. August 7, 2013 at 3:07 PM

    I constantly spent my half an hour to read this webpage’s posts everyday along with a cup of coffee.

  8. August 8, 2013 at 4:53 AM

    Great post. I was checking continuously this blog and I’m impressed! Extremely helpful information specifically the last part🙂 I care for such info a lot. I was seeking this particular info for a long time. Thank you and good luck.

  9. August 23, 2013 at 2:58 PM

    It’s in point of fact a great and helpful piece of info. I am happy that you simply shared this helpful info with us. Please stay us informed like this. Thanks for sharing.

  10. September 19, 2013 at 7:18 AM

    Really great blog – although I do not know English well is a subject interests me.
    In Poland we do not have such a well-developed
    blogs – Sorry for the mistakes, but I have a bad English

  11. September 21, 2013 at 11:13 PM

    Oh my goodness! Impressive article dude! Thank you so much, However I am having difficulties with your RSS. I don’t know why I can’t join it. Is there anybody else getting identical RSS issues? Anyone that knows the solution will you kindly respond? Thanx!!

  12. September 28, 2013 at 5:18 AM

    What’s up Dear, are you genuinely visiting this site daily, if so then you will absolutely take pleasant know-how.

  13. October 2, 2013 at 5:20 AM

    What’s up all, here every one is sharing these experience, so
    it’s good to read this blog, and I used to pay a
    visit this blog daily.

  14. October 24, 2013 at 5:16 PM

    Hello Dear, are you genuinely visiting this site on a regular
    basis, if so after that you will definitely take fastidious experience.

  15. October 24, 2013 at 5:16 PM

    Greetings! Very useful advice within this post!
    It’s the little changes that produce the largest changes.
    Thanks a lot for sharing!

  16. December 13, 2013 at 11:55 PM

    Hi, i read your blog occasionally and i own a similar one and i was just curious if you get a lot of
    spam remarks? If so how do you reduce it, any plugin or anything
    you can advise? I get so much lately it’s driving me
    mad so any support is very much appreciated.

  17. February 9, 2014 at 2:09 PM

    Hi my loved one! I wish to say that this post is awesome, nice
    written and include almost all vital infos. I would
    like to see more posts like this .

  18. March 4, 2014 at 4:43 PM

    True, there are comedians that cuss a lot,
    but you got to earn that right before you do that. “Arsenio was a big hit way back when,
    he exited prematurely, and aren’t we all just plain tired with Jay Leno
    and Letterman. Do some research and find out as much as you can about each open mic – try to find the one that is most positively
    reviewed, gets the biggest crowd and that is attended by the
    most comedians.

  19. April 29, 2014 at 10:54 AM

    I am regular visitor, how are you everybody? This paragraph posted at this website is actually good.

  20. May 19, 2014 at 4:36 AM

    So we’ll set the resourcefulness in truth need to go into how to increase twitter followers for your business concern the inside informations.
    And I’m the most defensive use it here. So in one battle, one asking, up to how many for Tony Lucca facilitate him win the rivalry?
    And so you a respectable catch and want to in reality scan the squeezes
    that I squeezed to my stream, okeh? Current Football Development manager at as shortly as I adjudge them so I don’t get confused afterward.

    On the demonstration, they hold merely cover all over it!

  21. May 27, 2014 at 3:19 AM

    This site was… how do you say it? Relevant!! Finally I’ve found something which helped me. Many thanks!

  22. June 30, 2014 at 10:58 AM

    Hi there, yes this piece of writing is genuinely fastidious and I have learned lot of things from it about blogging. thanks.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: