The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 18, 2019, 12:24:42 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Wordpress & Pinging  (Read 5016 times)
imred
Rookie
**
Offline Offline

Posts: 26


View Profile
« on: March 17, 2008, 04:21:49 AM »

Hey all,

  Yep, first time in the php forum Smiley  I usually like to stick to the ASP.Net forum, but now i am forced over here by Wordpress.

  I wrote a content generator that posts content, using XMLRPC, to Wordpress blogs.  However, it doesn't appear to ping when it posts.  I don't know if that is because I am using timestamps that are NOT current or if I am just not forcing the ping.

  I tried looking through the php code in both xmlrpc.php and post.php, but cannot figure out if it is supposed to ping when I call the blogger_newpost XMLRPC command.  I don't really even see WHERE the code is for pinging.  This is obviously a MUST HAVE for my system to really be worth anything to me.

Can anyone help?

Thanks in advance!
Logged
imred
Rookie
**
Offline Offline

Posts: 26


View Profile
« Reply #1 on: March 17, 2008, 05:09:32 AM »

ok, so I think I see it in the comment.php file...

I am guessing that do_all_pings will do the job, however, how do I get that to fire properly when I use XMLRPC (and blogger_newpost) to trigger my new content into the system?  It looks like the meta key should be set, but I don't see where that is done in either the xmlrpc.php file or the functions.php file or the post.php file.


Still confused.  I wish I were looking at asp.net, that might help Smiley
Logged
DangerMouse
Expert
****
Offline Offline

Posts: 244



View Profile
« Reply #2 on: March 17, 2008, 05:37:04 AM »

This may seem a little odd but I've never actually bothered with Wordpess (shock horror!) so I can't really help with your question.

However I'd suggest a better approach to hacking the core wordpress files would be to just mannually ping a select few ping services. As you've already mastered XMLRPC this shouldnt be a problem at all, plus you end up with full control, can update your Wordpress install anytime without worrying about backwards compatibility and have a tool you can apply to any number of other tasks  Wink

DM
Logged
imred
Rookie
**
Offline Offline

Posts: 26


View Profile
« Reply #3 on: March 17, 2008, 06:00:56 AM »

This may seem a little odd but I've never actually bothered with Wordpess (shock horror!) so I can't really help with your question.

However I'd suggest a better approach to hacking the core wordpress files would be to just mannually ping a select few ping services. As you've already mastered XMLRPC this shouldnt be a problem at all, plus you end up with full control, can update your Wordpress install anytime without worrying about backwards compatibility and have a tool you can apply to any number of other tasks  Wink

DM

Definitely a good point DM Smiley  I have considered that mainly because I DO have sites that I ping already.  However, in this case, I wanted WP to do it so that it seems a bit more 'legit'.  Not too sure it makes a difference, but I really would prefer to do it this way.  I don't even want to hack WP, but since I have already created a customized XMLRPC file to add timestamps to my content-generator, then I would rather just force that piece to ping the blog after the post.

Now - 1 thing I am not sure of.... It may actually be pinging.  I only thought it wasn't because I didn't see any resultant bots spidering at ping-time and all my other blogs (manual blogs) get a spider near-immediate.

In the wp_posts table, I see 'closed' for ping_status, so would have hoped that meant it DID ping.  I guess I will look around to find out if there is a ping test site so that I can ping it and see if the pinging is working Smiley  I don't know.... I'm grasping at straws now Smiley

Thanks for the reply!

Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #4 on: March 17, 2008, 10:48:41 AM »

Put a dummy service under your own control into the ping list and see if you get hit.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
imred
Rookie
**
Offline Offline

Posts: 26


View Profile
« Reply #5 on: March 17, 2008, 12:19:33 PM »

Put a dummy service under your own control into the ping list and see if you get hit.

I've been trying to figure out how to set up a dummy service since my last post Sad  Not having much luck, though.  I did check a number of the services that I had pinged not so long ago and my content wasn't in any of them, so I can only assume that it is not pinging properly.

I looked around and read that WP doesn't post until after the next time WP is 'refreshed', but places something in the database that tells the do_pings() function to ping those threads.  I am still trying to figure out how it does that so that I can get it to ping for me.

Thanks again for the help, guys.  Hopefully I'll figure it out sometime
Logged
Bompa
Administrator
Lifer
*****
Offline Offline

Posts: 564


Where does this show?


View Profile
« Reply #6 on: March 18, 2008, 07:27:59 PM »

I never even thought of wp doing the ping.  I just put a pinger in my posting code.

It's just one line with pingomatice:

#$ping_content = get("http://pingomatic.com/ping/?title=$username&blogurl=http%3A%2F%2F
$base&rssurl=http%3A%2F%2F$base%2Ffeed%2F&chk_weblogscom=on&chk_blogs= oetc etc etc"); truncated

get the url with firefox at pingomatic

or you can ping the important ones with:

  @ping_servers = (
  "http://rpc.weblogs.com/pingSiteForm?name=$username&url=http%3A%2F%2F$base",
  "http://api.my.yahoo.com/rss/ping?u=http%3A%2F%2F$base",
  "http://api.moreover.com/ping?u=http%3A%2F%2F$base",
  }


Either way will bring googlebot and yahoofeedfinder

Bompa

Logged

"The most beautiful and profound emotion we can experience is the sensation of the mystical..." - Albert Einstein
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #7 on: March 18, 2008, 10:27:58 PM »

Nice Bomps
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!