开发者

detecting a valid CSS document with PHP?

Is there a way to have PHP detect if a file 开发者_JS百科is a valid CSS document?


I suppose you could use CURL to submit the .css file to the W3 CSS validator. Scraping the results to determine whether the validator thinks the css in question is valid would be a bit of a challenge though, especially if you want to extract the list of errors if it's not valid.

If you hammer their validator with a lot of requests, however, they could possibly block you. Be aware of that if you do go the curl route.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜