Most bloggers uses Adsense on their blog and (try to) make money with Google. ħ – Follow your Adsense earnings with an RSS reader Of course, this code is only for educationnal purposes. To do so, they simply have to fill the $postfields array with the info they want to display and load the page. In a previous article, I have discussed how spammers spams your WordPress blog. ![]() Source: 6 – Post comments on WordPress blogs In fact, it is basic, but it is also very useful, especially when you have to work with external resources. $request = xmlrpc_encode_request('metaWeblog.newPost',$params) Ĭurl_setopt($ch, CURLOPT_POSTFIELDS, $request) Ĭurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1) $params = array(0,$username,$password,$content,true) 'mt_allow_pings'=>0, // 1 to allow trackbacks 'mt_allow_comments'=>0, // 1 to allow comments $keywords = htmlentities($keywords,ENT_NOQUOTES,$encoding) $title = htmlentities($title,ENT_NOQUOTES,$encoding) function wpPostXMLRPC($title,$body,$rpcurl,$username,$password,$category,$keywords='',$encoding='UTF-8') Another thing, make sure the XMLRPC functions are activated on your php.ini file. If this option isn’t activated, the code will not be able to insert anything into WordPress database. Though, you must activate the XMLRPC posting option in your WordPress blog. You don’t need to login to your WP dashboard etc. This function can post on your WordPress blog. Source: 4 – Publish a post on your WordPress blog, using cURL The output will be a full report of download speed. You just have to initialize the $url variable with any resources from the webserver (images, pdf, etc), place the file on your server and point your browser to it. Wanna update your facebook status, but don’t want to go to, login, and finally being able to update your status? Simply save the following code on your server, define the variables, and voilà ! '.ucfirst($first_name).'/', $page, $form_id) Ĭurl_setopt($ch, CURLOPT_POSTFIELDS,'post_form_id='.$form_id.'&status='.urlencode($status).'&update=Update') ĭo you ever wanted to know the exact download speed of your webserver (or any other?) If yes, you’ll love that code. The goal of this article is only educationnal, please do not use any of the snippets below for illegal stuff. Please note that some of the techniques shown here can be used for “blackhat” methods. cURL tutorial: Using cURL to automate HTTP jobs.New to cURL? If yes, check out the following articles to learn the purposes and basics of cURL/libcurl. 10 – Post to Twitter using PHP and cURL.9 – Get the content of a webpage into a PHP variable.8 – Get feed subscribers count in full text.7 – Follow your Adsense earnings with an RSS reader.4 – Publish a post on your WordPress blog, using cURL.2 – Get download speed of your webserver.The following is the code that Dynamic Drive provides. Visitors can use the white V arrow to scroll through the entries. The scroller on the right shows 10 entries from two different sources. The code they provide shows two different types of RSS scrollers as shown in the screenshot.Īs you can see, the scroller on the left displays five entries at a time from a single source. The first example comes from Dynamic Drive and their SAG scroller. The content doesn’t even necessarily have to be your own, you can use feeds from different sites as well, but it’s best to use relevant content to your site. This can be a very effective way to provide fresh content to your readers. The purpose of this article is to show different ways on how to present RSS feeds on your site. You can also use services such as HootSuite to push your RSS feed out to places like Twitter, Facebook and many other social networking sites. You can also add your RSS feed to your own site to create an automated means to showcase your latest content. Visitors can then add your RSS feed to their Google Reader or as a widget on their iGoogle pages. You can start a new RSS feed, depending on your site, through such places as Feedburner. RSS (Really Simple Syndication) feeds provide a means for regular visitors of your website to stay informed of your most recent content.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |