![]() Set curl to return the data instead of printing it to the browser. happilly, cURL can simply grab the count value and return it to you as a variable so you can display it as you want on your blog. I personally like the chicklet’s look, but I heard lots of bloggers complaining about it. ![]() Feedburner have a chicklet to proudly display your subscriber count on your blog. If you’re a blogger, you’re probably using the popular FeedBurner service, which allo you to know how many people grabbed your rss feed. Source: 8 – Get feed subscribers count in full text (Script too big to be displayed on the blog, click here to preview) This excellent snippet allows you to follow your Adsense earnings…with a RSS reader! Definitely awesome. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |