getting absolute addresses: am i oversimplifying?
Posted: Tue Jun 02, 2009 3:38 pm
Ok, so:
I can use cURL to get the contents of a page.
I can use regexps to get a list of links.
For an arbitrary page, what is the most general way to fill out relative links? Like, going from "about.html" to "www.site.com/about.html" when I am currently reading "www.site.com/index.html."
I care more about generalization and accuracy than efficiency.
Thank you kindly for help,
alex.
I can use cURL to get the contents of a page.
I can use regexps to get a list of links.
For an arbitrary page, what is the most general way to fill out relative links? Like, going from "about.html" to "www.site.com/about.html" when I am currently reading "www.site.com/index.html."
I care more about generalization and accuracy than efficiency.
Thank you kindly for help,
alex.