HTML Form to Input URL Define an HTML input element to provide a web page URL.
Extract Metadata from URL The following code snippet extracts the title and metadata from the submitted URL using PHP. Initialize and load the UrlMeta library. Pass the URL in the UrlMeta class. Get title, description, keywords, and image from remote URL using getWebsiteData() function of UrlMeta class. Decode JSON data in array using PHP json_decode() function. Link Preview Box Display thumbnail image, title, and description as a box view to show link preview. Provide a hyperlink with a URL to visit the web page.