maybe this is an old question but i'm trying as a personal experiment to fetch a page form the web and the make a copy out of it with all the relative urls, links, href, src etc withn absolute urls
i'm using CURL to fetch hte page and I have now a $html variable that contains all the code..
so what; the next step? shoud i use preg_replace? how?
thanks
下一步是把它变成一个HTML解析器和遍历树,寻找和固定href
上的属性a
标签, src
的属性img
标签,等等等等解析器将能够重新发射的树作为一个字符串完成后。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.