This basic script demonstrates how to capture an id from the URL (e.g., ://yoursite.com ) and show corresponding content:
The search query inurl:index.php?id= is a common Google Dork inurl indexphpid