pilif.ch - a cuwps

[home]
stuff
some worldwide unique stuff
  • Daily Strips
  • PersistentHandler
  • Denis' Birthday
  • DVD-Region (1)
  • DVD-Region (2)
  • Defeating Miguel
  • Neuronal Interface ;-)
  • Swiss ADSL Check
  • Autodestructing Email
  • Fun with bounces
  • backstage
    backstage-reports of some of my paid projects
  • bookexchange.ch
  • info
    valuable information for my visitors
  • RasInTask
  •  
    introduction
    Here in Switzerland we are still at the beginning of fully exploiting the advantages ADSL gives to the advanced internet-surfer. I for myself am not using ADSL and I will never be able to as long as I live with my parents since our house cannot be equipped with that technology since the distance between the house and the next Swisscom POP is too far.

    However: I am a coder in the company responsible for Adsl.ch and I have written a PHP-Interface to the XML-based ADSL-Checker provided by Swisscom. The XML interface is basically the same you can see at linecheck.ch, but without any presentation layer which allows you to create your own user interface.

    On superspeed.ch we did this in the box at the top right and with our SMS-Checker.

    The PHP-Class on this page is capable of parsing the XML-Answer of the Swisscom-Checker, has workarounds for the checker not following its own DTD and giving a nice interface for all the different error-situations. If you want to create your own Number-Checker, feel free to use this class.

    technology
    adslChecker is written using PHP4 and requires the DOM-XML-functions including XPath to be compiled in. This is some kind of a drawback, but I was in quite a hurry to implement the class, so I used the DOM for accessing it.

    Your Webserver must have access to Port 80 of www.swisscom.com or you will have to use some kind of a transparent proxy or whatever (like we had to since some stupid routing restriction does not allow servers housed at swisscom to access other swisscom-servers)

    As the Server now sends a redirect when accessing the official URL and as the file-functions of PHP do not support HTTP-Redirects, I have implemented the fetching of the XML-Answer via curl that, of course, has to be compiled into your PHP-distribution.

    license
    adslCheck is distributed under the terms of the BSD License which means about: "do whatever you like with the code, but respect I being the copyright holder"

    getting the files
    First of all I apologize for the non-availabliy of any documentation. I will provide it as soon as possible, but I think the usage of the class should not be too difficult. The pretty view below should help you understand it.


    © 2003 by pilif. cuwps stands for completely useless webpage and is a non-registered non-trademark by pilif - Last Modification: 08/31/01 at 23:33:38