what can be the best method to consume data from 1 site to another site using php.
Site A is classified site listing ads (cars, animals, bikes etc).
Site B is another classified site that also list ads, Site B wants to show its ads on site A.
I know there should be 2 implementation 1 on Site A (data consumer), and another on site B (data generator).
Site B should has an account on site A, and should provide username and password, to be consumed data on site A
I am considering SOAP. Any better suggestion...
If you own both sites you should look into creating some sort of an API that can be called from other locations. Web services are very helpful and SOAP is a great way to go. The other method would be to allow access to your database from remote locations and then open a connection from Site B to Site A when needed. This does offer up a few security concerns though and may be a bit sluggish depending on where the servers are in relationship to one another geographically.
I would suggest you to make Rest Api for your application.