I have a bunch of URLs to parse in PHP, like this:
www.example.com/shopping shopping.example.com example.com/pages/shopping
for about 100 different pages (not just shopping - some are contact, some are directions, etc.). I have a seed set of data, which tells me where to look for the page names, like this:
www.example.com/[pagename] [pagename].example.com example.com/users/[pagename]
My question is, how do I get the page name from a URL using the seed data to tell me where it is?
So if I use the URL www.example.com/shopping
I want to compare it to www.example.com/[pagename]
, and then just give me the page name of "shopping", pulled out from the string.