When loading a page, let's say facebook.com the page loads multiple resources from several other sites, like fbexternal-a.akamaihd.net or fbcdn-profile-a.akamaihd.net.
I need to create a script in PHP, Bash, Python or just any other language that can get all those addresses.
How can I do this? Is there a web service that does this?
A bit more of what I'm trying to achieve: There is a router that needs to block all access except a single page and its resources that may be on other servers. Since this ACL (Access Control List) is not DNS based I have to get all ip addresses to add them to the list.
I know that IP addresses change often, however this is the only workaround works right now (by getting ip addresses manually) given that the router does not have DNS based ACL.