I needed to get a part of a website, and show that in a wordpress post, so I made a WP plugin, what use curl to get the data from the site, and cut the appropriate part, what I want to show in the post.

The plugin is very simple, you just need to install, activate, and ready to use.

The only way to use it, a shortcode;

curlparser url=”http://www.site.com/” sample1=”start of the cut” sample2=”end of the cut” prefix=”text to add before the cut suffix=”text to add after the cut” replace_from=”string” replace_to=”string”]

 

url – the URL of the site, what contains the needed information.
sample1 – the start of the area, what you want to cut
sample2 – the string, what follow the last character of the area, what you want
prefix – a string, what you can add before the cutted area.
suffix – a string, what you can add after the cutted area.
replace_from – a string what you want to replace in the cutted area.
replace_to – the string what replaces the “replace_from” text.

An example from my site;

 

curlparser url=”http://www.fiverr.com/users/utd42/gigs/help-you-find-errors-in-php-sql-javascript-code” sample1=’<div class=”feedback”>’  sample2=’<div class=”other-gigs”>’ prefix=”<style>.seller-block ,.entry .feedback h3{display:none;} hr {display:block;}</style>” suffix=”" replace_from=”/users/” replace_to=”http://www.fiverr.com/users/”

 

The shortcode above cut the feedbacks from my fiverr page, add the “http:/www.fiverr.com” to the URL-s of the string,and add some style changes in the prefix.

 

Download the WordPress Simple Curlparser Plugin V1.0 plugin.