You are looking form social share links. If you want to share the blog post feature image on social sites then you should use meta properties. You will be able to share the post image on the PHP website. Along with feature image, you will be able to share website title, post description.
Share blog post image on social share sites like - Twitter, Facebook, Linkedin
First of all, create social share buttons -
Create social share buttons in the blog using PHP and MYSQL
Now, add meta in the <head> ...... </head> section.
<meta property="og:url" content="your-domain.com/your-page.html" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Your Website Title" />
<meta property="og:description" content="Your description" />
<meta property="og:image" content="your-domain.com/path/image.jpg" />
Provide the image path and other content from the MYSQ database.
It will help to share your blog post feature image on social networking sites.