Face Recognition application php

I need to make a php application for Celebrity Look Alike, where user can upload his/her picture and system will detect the closest match of celebrity. I dont know where to start. Can someone gives me basic instructions where to start from, My approach is to detect facial positions of user and then compare it celebrity facial positions., but question is where i can get the required data of celebrity or should i go for api.

Pls advice.

There is this blog I found when I tried it out a few years ago.

But this blog is detecting image, not recognizing