Lets say i have 2 websites
website 1, my blog
website 2, a webservice/page that spits out my current address nicely formated in a DIV tag, depending on some argument i passed in the URL..
is it possible to create a plugin/something that i can include in a post that will grab the data from my website 2 and display it in a POST on website 1 ?
for ex
My dog lives here <EMBED>http://www.website2.com/someurl.aspx?Itemid=3</EMBED>
?
fierodeval
Member
Posted 2 years ago #
See this tutorial: http://markjaquith.wordpress.com/2006/03/04/wp-tutorial-your-first-wp-plugin/
In this tutorial, if you write the text "foo" the plugin converts this word to "bar".
In your plugin, you can search for your special tag, for example <embedpage page.html> (or any other syntax of your invention) and replace it by the HTML code returned by a PHP call to the page into the tag. You can use fileopen function in PHP to read the code from the website 2.
regards!
If you don't mind iframes, you can add:
<iframe name="" src="http://www.thedomainname.com/p107776874" width="100%" height="900px"></iframe>
Otherwise, install a plug-in like Include It. Then create a php file with : <?php include("http://www.thedomainname.com/p107776874"); ?> in it. Save it to the blog's root directory and call it from the page or post with [include file=nameofyourphpfile.php]