PHP utility class – Url Checker 1.0
Another light utility class to check if your urls are valids.
Simply get an instance of UrlChecker and check each url. If url is valid, the class'll return "200" success code.
Available on my downloads page or directly here
PHP – Remote post on WordPress using cUrl
Here's a code snippet function for remote posting on WordPress blogs I've made for my usage. It use XML-RPC and cUrl to publish on your blog.
Hope it'll help you.
-
<?php
-
-
/**
-
* Remote post on WordPress function
-
*
-
* @date 2010-10-22
-
* @author David Ansermot
-
* @url http://www.ansermot.ch
-
*
-
* @param string $url: Your blog's url
-
* @param string $login: Your blog's login
-
* @param string $pass: Your blog's password
-
* @param string $postTitle: The post's title
-
* @param string $postCats: A comma separated list of categories's ids
-
* @param string $postContent: The post's content
-
* @return bool
-
*/
-
function curlRemotePostToWordPress($url, $login, $pass, $postTitle, $postCats, $postContent) {
-
-
// Remote post url
-
-
// Categories for the post
-
-
// Post xml
-
$xml = '<title>'.$postTitle.'
-
<category>'.$categories.'</category>
-
< ![CDATA[ '.$postContent.' ]]>';
-
-
-
// Build request
-
-
// Send the request
-
try {
-
-
-
// cUrl configuration
-
-
// Execution
-
-
return true;
-
-
} catch (Exception $e) {
-
-
return false;
-
-
}
-
}
-
-
?>
WordPress 2.9.1 Beta 1
Unfortunately, the recent 2.9 release triggered a bug in certain versions of PHP’s curl extension. With these versions of curl, scheduled posts and pingbacks are not processed correctly. To fix this problem as well as a handful of other, lesser issues, we are quickly releasing 2.9.1, the first maintenance release of the 2.9 line. Help us get 2.9.1 ready to go by testing 2.9.1 Beta 1. The easiest way to test Beta 1 is to install the WordPress Beta Tester plugin, elect to get on the point release development track, and then perform an automatic upgrade via the Tools->Upgrade menu. You can also download the Beta 1 package and install manually. Fourteen tickets have been fixed in 2.9.1 Beta 1. Since the curl problem and a couple of other problems are dependent on specific hosting configurations, any and all testing help is greatly appreciated.
Source : wordpress.org
