Get URL of Featured Image After wp_insert_post()

Well you have the ID as $attach_id so you can use a function such as wp_get_attachment_url() where you can pass $attach_id and get a url returned:

$featured_url = wp_get_attachment_url( $attach_id );

Or if you want more information such as width, height, etc. you can use functions like wp_get_attachment_image_src() or wp_get_attachment_metadata().

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