HF RL Explorer

Task: Extract Title and Meta Tags from HTML Content using PHP

Task: Extract Title and Meta Tags from HTML Content using PHP: a task in Terminal-Lego-15k (Harbor dataset). Create a PHP script that extracts the <title tag content and <meta tag information from HTML content. The script should handle various HTML structures, including cases where tags appear in…

The task

Create a PHP script that extracts the `<title>` tag content and `<meta>` tag information from HTML content. The script should handle various HTML structures, including cases where tags appear in different orders, and should work with potentially malformed or irregular HTML (not relying solely on regex).

Part of PrimeIntellect/Terminal-Lego-15k.