I want to create a php script that reads the rss feed content from another website and then adds those read information into my WordPress website's database so that when you go to my WordPress website you will see those inserted posts via my php code.
The problem is: I want to use built in codes of WordPress for adding new posts and I don’t want to go through writing my own code for inserting data into MySQL.
Is there a fast way?
I want to be able to add these information into WordPress by my php script:
- Post content
- Post title
- Post categories
- Date: for this I want to add the time and date when the new post is inserted into database.
At the beginning of my php script that I am writing, I first connect to the wordpress's Database using username and password of that database.
Is there a fast way for adding new content by php into wordpress's database? Is there any special function for doing this? And for using that function what should I do in my php script? What should I include in it?