So I do not want to pull whole page, just the first 40KB of the page. Just like this Facebook Debugger tool does.
My goal is to grab social media meta-data, i.e. og:image
etc.
Can be in any programming language, PHP or Python.
I do have code in phpQuery that uses file_get_contents/cURL and I know how to parse the received HTML, my question is "How to fetch only first nKB of a page without fetching whole page"