Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9130345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:56:53+00:00 2026-06-17T07:56:53+00:00

Having read the WordPress docs, and done some research, it seems as if the

  • 0

Having read the WordPress docs, and done some research, it seems as if the advice on how to get the last 10 posts on a WordPress site, is to do the following:

require 'xmlrpc/client'
#initialize a connection
connection = XMLRPC::Client.new2('http://www.mywordpresssite.com')
result = connection.call('metaWeblog.getRecentPosts', 1,'admin','123456')
#or it seems that I can also call:
result = connection.call('wp.getPages', 1,'admin','123456',10)

Following the connection call, I get a legitimate result:

 => #<XMLRPC::Client:0x007fdfec50cac0 @http_header_extra=nil, @http_last_response=nil, @cookie=nil, @host="www.mywordpresssite.com", @path="/RPC2", @proxy_host=nil, @proxy_port=nil, @use_ssl=false, @timeout=30, @port=80, @password=nil, @user=nil, @auth=nil, @http=#<Net::HTTP www.mywordpresssite.com:80 open=false>, @parser=nil, @create=nil> 

But when I do:

result = connection.call('wp.getPages', 1,'admin','123456',10)

or

result = connection.call('metaWeblog.getRecentPosts', 1,'admin','123456')

I get:

SocketError: getaddrinfo: nodename nor servname provided, or not known

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:56:54+00:00Added an answer on June 17, 2026 at 7:56 am

    Actually I was having the same error message when trying to post from my Sinatra app with the xmlrpc/client.

    The interesting is, when I used the same way of posting from IRB, I could successfully post to my blog.

    I found out that it seems xmlrpc does not really like the protocol. I removed the

          http:// 
    

    from the link and it went without a hitch. Give it a try, maybe helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some trouble reading files with Indy from a site that has WordPress
Having read around this site I thought the following code would return the ID
Having read an existing post on stackoverflow and done some reading around on the
Having read the documentation for VPython and GTK threading , it seems to me
Having read around it appears this should be possible. I have the following content
Having read some of the guidelines for images, I am still unsure of the
Having read some postings here about this topic, I realize that there are quite
having read the docs, https://docs.djangoproject.com/en/dev/topics/signals/ i have created this in my signals.py file: from
Having read most of the available documentation on Android services on the developer site
Having read the following at http://golang.org/doc/effective_go.html#arrays ... Arrays are values. Assigning one array to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.