0

I've word-press blog installed on my Godaddy's Domain.

www.mysite.com/blog

I want to get the latest posts of my blog using C#/ASP.Net code, how can I do this?

Rowan Freeman
  • 15,724
  • 11
  • 69
  • 100
Imran Arshad
  • 3,794
  • 2
  • 22
  • 27

3 Answers3

1

WordPress provides an XML-RPC API that includes getPosts and similar function. You can find a couple of pre-built clients for it on NuGet; I haven't tried either to recommend them but from the GitHub readme the first one looks more complete:

Also if you've got the Jetpack plugin installed on your site then that adds a JSON API. I can't recommend one sorry but again there'll be OAuth2 and REST API clients on NuGet.

Rup
  • 33,765
  • 9
  • 83
  • 112
0

Ok guys; basically i required my latest blogs post , so what i used

http://p3k.org/rss/

p3k.org/ takes the path of my blog feed and returns me latest post.

I simply embed in my project using the generated script . So i don't need to get info ASP.net code .

Cheers!

Imran Arshad
  • 3,794
  • 2
  • 22
  • 27
-1

As per my view and research, you can access wordpress DB in asp.net c# by using MySqlConnection.

Please visit following link for more information about MySQL Connection.

http://www.codeproject.com/Tips/355977/Csharp-ASP-NET-MySQL-Connection-Tutorial-with-MySQ

user2021740
  • 174
  • 2
  • 11
  • This is an option, but relies on the client having direct DB access which it may not - it would be possible using security groups on Amazon EC2 but I don't know GoDaddy - and is also potentially fragile against WordPress schema changes, and you'd need to duplicate any logic for custom post types etc. that the blog can decide whether to expose to clients on not on the server side. – Rup Jun 11 '14 at 11:18