Dynamic Loading Interface Until The Data Is Processed

I am writing a php program that takes URL as input from the users and finds out the dead links from that webpage of the URL. Sometimes, if the webpage is too big then my execution speed of the program takes some more time. So how can I make a dynamic interface like loading (until the data program is fully executed)?