Plugin Author
Eli
(@scheeeli)
You can start with the simplest part of the example and build on it. The minimal example would look like this:
[remote_get url="http://ww.wp.xz.cn/extend/plugins/shortcurl/stats/"]
The above shortcode would return the entire HTML source code from the Stats page for this plugin. If you put this in the middle of one of your posts on your WordPress site it would be pretty messy and cause lots of HTML tags on your page to break. For testing purposes you might want to try wrapping this shortcode in an HTML Textarea so that the HTML returned is contained in a textbox that you can scroll through an read on your page. Then you can determine where in the source code you want to start and stop capturing your return, and you can add those parameters like this:
[remote_get url="http://ww.wp.xz.cn/extend/plugins/shortcurl/stats/" start='<div class="block-content"' stop='!-- block-content--']
You can drop the < character at the end of this returned code with the length=”-1″ parameter, and then you might want to replace some of the returned text with your own text using the “replace” and “with” parameters (either to modify the original content or to fix the relative paths in the HTML links). Then, you might end up with a really long shortcode 😉 like this:
[remote_get url="http://ww.wp.xz.cn/extend/plugins/shortcurl/stats/" start='<div class="block-content"' stop='!-- block-content--' length="-1" replace="='/extend" with="='http://ww.wp.xz.cn/extend" replace2="%2Fextend%2F" with2="http%3A%2F%2Fww.wp.xz.cn%2Fextend%2F"]
Aloha, Eli