bobleny Posted January 18, 2009 Share Posted January 18, 2009 Hmm, been a while since I've posted.... Hi, me again! Hey, I'm having a small issue with this script on my server and I don't know why. There may be a better way of doing this, but this is all I could come up with. The objective is to validate the xhtml of my site on the fly. I simply want to navigate the hundreds of pages on my site and have the server tell me if that page is valid. I'm using AJAX to do this, but the general idea is something like this: <?php $loc = $_GET['loc']; $file = file($loc); echo "Line 6: ". $file[6] ."<br />"; echo $loc ."<br />"; ?> The problem is that I am not getting anything back from the w3c site. If the script was working, line 6 should read either [Valid] or [invalid]. I really don't think the problem is the script its self, I think it has something to do with my sites server because the script will sort of work from my desktop server. However since I can't send the validator a localhost address, it won't validate. So, does anyone have a better way of doing this, and or an explanation as to why it won't work from my sites server? Thanks! Quote Link to comment Share on other sites More sharing options...
trq Posted January 18, 2009 Share Posted January 18, 2009 If file isn't working on remote files it can mean that url wrappers are disabled on the host. Alot of hosts disable this feature. Take a look at the output of phpinfo to see. Quote Link to comment Share on other sites More sharing options...
bobleny Posted January 18, 2009 Author Share Posted January 18, 2009 Thanks for the quick reply! Does "--with-curlwrappers" mean url wrappers is turned off? Can url wrappers do harm? Oh, maybe they disable it to help prevent bandwidth attacks on sites? Oh, I did find a work around to the problem at least. I would have told you about it sooner, but the power went out.... :'( The server on my desktop and the server for my site "should" be identical, so I modified the script so it would chop up the url and add the site url prefix. Too bad I can't get it to work on the server though. I would set it up with my database so my site could alert me of validation errors. All well.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.