使用Rest Api在wordpress博客和PHP网站之间相互交换数据?

I am developing two simple sites using wordpress and other using PHP i want to exchange data between these two mutually using Rest.

I must be able to post data into or get data from wordpress site from site build based on PHP.

I must be able to post data into or get data from PHP based site from my wordpress site

these both are on localhost is there any plugin, documentation or resource for this to be performed.

Any suggestions will help me thanks in advance.

Could do with some more information to be more helpful, for example if you are developing the two sites, why not do them both in Wordpress? Is the standard PHP site an existing project you are taking over? Is the code completely written from scratch or does it use a framework?

In the meantime I would suggest looking into a Framework, for example I use Zend Framework, and although I haven't used it specficially it does have REST client and server classes

http://framework.zend.com/manual/1.12/en/zend.rest.server.html

Looks quite nice

/**
* Say Hello
*
* @param string $who
* @param string $when
* @return string
*/
function sayHello($who, $when)
{
    return "Hello $who, Good $when";
}

$server = new Zend_Rest_Server();
$server->addFunction('sayHello');
$server->handle();