+ Reply to Thread
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34

Thread: My Markup Validator

  1. #1
    nonsensep is offline x10Hosting Member nonsensep is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    United States
    Posts
    39

    My Markup Validator

    Hi! I would like to tell you about my first web tool. It's not really a markup validator, like the title says. It's just a PHP script that sends an HTTP request to the W3C Markup Validator and then outputs what it says about a given URI (as a PNG image). Here are some examples of using the validator on various websites:

    Code:
    <img src="http://www.nonsensep.x10hosting.com/markupvalid.php?uri=http://www.w3.org/" />
    (Valid markup)
    Code:
    http://www.nonsensep.x10hosting.com/markupvalid.php?uri=http://www.youtube.com/
    (Invalid markup)
    Code:
    http://www.nonsensep.x10hosting.com/markupvalid.php?uri=http://www.w3.org/&charset=iso-8859-1
    (Tentatively valid markup)
    Code:
    http://www.nonsensep.x10hosting.com/markupvalid.php?uri=http://www.circuitcity.com/
    (No <!DOCTYPE>)
    Code:
    http://www.nonsensep.x10hosting.com/markupvalid.php?uri=http://www.bestbuy.com/
    (404 error, not a URI, etc.)

    The image is just 176x31 pixels. As the colored text points out, it's only using one image file for many different cases. I hope you guys find it useful.

    Any suggestions? Comments? Tell me so! I plan on making a better style sometime. But it works, and that's what counts. And feel free to use it however you like
    Last edited by nonsensep; 10-25-2007 at 04:14 PM.

  2. #2
    QuwenQ is offline x10 Elder QuwenQ is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    977

    Re: My Markup Validator

    That seems useful, except for the minor problem that someone already made a button like this:

    What's the advantage of using yours?
    Last edited by QuwenQ; 10-25-2007 at 02:41 AM.

  3. #3
    nonsensep is offline x10Hosting Member nonsensep is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    United States
    Posts
    39

    Re: My Markup Validator

    Yeah, but that image will always say "Valid XHTML 1.0", even when there are errors. My image changes every time and tells the user straight from the W3C validator whether the page is valid or not. And how many errors/warnings. For example:

    Code:
    http://www.nonsensep.x10hosting.com/markupvalid.php?uri=http://forums.x10hosting.com/


    Now let's see what W3C says about the same URI:

    http://validator.w3.org/check?uri=http://forums.x10hosting.com/

    Try using my image with your own URI. Just enter this in your address bar:

    Code:
    http://www.nonsensep.x10hosting.com/markupvalid.php?uri=http://YOUR_SITE_HERE/
    Last edited by nonsensep; 10-25-2007 at 05:42 AM.

  4. #4
    Archkronos's Avatar
    Archkronos is offline x10 Lieutenant Archkronos is an unknown quantity at this point
    Join Date
    Jul 2007
    Location
    The Underworld (UK)
    Posts
    257

    Re: My Markup Validator



    Horray for lazy coding!

  5. #5
    nonsensep is offline x10Hosting Member nonsensep is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    United States
    Posts
    39

    Re: My Markup Validator

    Quote Originally Posted by Archkronos View Post


    Horray for lazy coding!
    thats how computers began! laziness!
    Last edited by nonsensep; 10-25-2007 at 07:30 AM.

  6. #6
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: My Markup Validator



    Interesting concept Glad to know there are actually developers on x10...

    Have you implemented caching yet? Parsing the site every time the image is loaded would be rather taxing on the server. It would also cause the image to load slower as it has to wait for the server to download and parse the page...

    Good work though :D

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  7. #7
    eminemix's Avatar
    eminemix is offline x10 Lieutenant eminemix is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    EU
    Posts
    349

    Re: My Markup Validator

    Good job nonsensep
    :coolugh:


  8. #8
    nonsensep is offline x10Hosting Member nonsensep is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    United States
    Posts
    39

    Re: My Markup Validator

    thank you Slothie and eminemix! And about caching, I see what you're saying, but I'm not sure if that'd defeat the purpose of it or not...

    Well, do you think there's a way to have a session for the website and when the session ends the cache expires? That would be sort of a compromise, I guess. I'll look into that.

    Oh, and I'm planning on making one for CSS, also.

  9. #9
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: My Markup Validator

    You could cache it on an hourly basis or so. Sessions would be too short :P

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  10. #10
    nonsensep is offline x10Hosting Member nonsensep is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    United States
    Posts
    39

    Re: My Markup Validator

    I don't know, an hour seems too long. I don't think that there will be too much of a problem if the image takes a little while to load.

+ Reply to Thread
Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers