Plugin Directory

Inline PHP

Author: kukukuan

The plugin can execute php string in posts/pages, and display the output as the contents of posts/pages. Just quote what you want to execute in <exec>...</exec> or [exec]...[/exec] tag.

Here is a simple demo: echo 'This is a test'; OR [exec] echo 'This is a test'; [/exec]

An advanced demo may look like this:

   <exec>
       $filestr = file_get_contents('http://www.seocompany.ca/pagerank/page-rank-update-list.html');
       if (preg_match('/<p>.*<\/p>/ums', $filestr, $matches)){
           echo str_replace("<p><a href=\"#page-rank-update-list-history\">Top of Page Rank Update List History</a></p>", "", str_replace("<table width=\"65%\">", "<table width=\"100%\">", $matches[0]));
       }
   </exec>

Here is a post to show PageRank Export History with the code above. HERE (Notice: I also add some CSS style to make the output nicer.)

Tags: , , , ,

Download

FYI

Compatibility beta

Your Setup

Log in to vote.

The Consensus (1 reporting)

100%
100,1,1

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(7 ratings)