How to Submit Post Via cURL & PHP

Have a look at wp-cli and wp-api they could help you automate your process without you needing to know too much about wordpress.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)