HTML -> PHP Converter



  • From Troels ...

    Just wanted to share with you this amazing piece of software, which I stumbled upon. Finally here - A genuine HTML -> PHP converter, and the homepage advertizes that the newest version is up to 3 times faster than the previous one. If only it had been available before, I wouldn't have wasted all thoose years learning to write PHP.



  • Writing HTML has never resembled writing coldfusion so much.



  • Does the php script actually do something useful then besides just rendering the html you started with? I suppose it does, because otherwise there would be no use to not stick with html, but I can't find what exactly on their site, and i'm not going to download the trial just to see



  • Bahaha, I installed it and converted this

    <html>
    <body>
    <h1>Got PHP?</h1>
    </body>
    </html>

    to this brillant piece of crap:

    <?php
    echo "<html><body>\n";
    echo "<h1>Got PHP?</h1>\n";
    echo "</body></html>\n";
    ?>

    Writing PHP has never been so easy!!

    (Would you please respect the lt and gt entities, TelligentSystems?)



  • @Joost_ said:

    Bahaha, I installed it and converted this

    *snippage*

    Writing PHP has never been so easy!!

    I wonder how much money they've made selling this? 'Cause if it's much (or any!), I'm giving up trying to make an honest living.



  • Let me see, they're charging $9,99 for this



    $ cat file.html | sed -e 's/^(.*)$/echo "\1";/g' > file.php



    I don't know what is dumber... He who sells it or he who BUYS it...



    brillant!



  • What worries me, is that this is version 4.2; it implies that they didn't get it right first time. How long have they been developing this thing for?



  • I just checked the site, it is now in version 4!!!


    With this tool you can easily convert HTML or SHTML code to PHP code with a few clicks. This version has been completely re-written. Re-written parts include the converter engine, interface, and more. The converter engine has been optimized to give you much faster conversion speeds. Depending on your computer's speed, you can convert a 900-line HTML file to a PHP file in less than three seconds.


  • 900-line HTML file?



  • But still, you'd need some special syntax to make it do nice things?

    <loop></loop>

    And things like that.



  • @dhromed said:

    But still, you'd need some special syntax to make it do nice things?

    <loop></loop><loop></loop>

    And things like that.

    If that were the case, you'd be learning new syntax anyway, which would defeat the point of not having to learn PHP...




  • Early waiting for version 5
    I've heard rumors that this feature is implemented:

    for($i=0;$i<$spaces;$i++) {
     echo "&nbsp;"
    }



  • Just for kicks, I ran it on the source from this post....care to guess what it gave me?





    The input file...echoed!  I oughta write a program to do this and sell it for 4.99...oh right...I HAVE a life....



  • @rswafford said:

    Just for kicks, I ran it on the source from this post....care to guess what it gave me?





    The input file...echoed!  I oughta write a program to do this and sell it for 4.99...oh right...I HAVE a life....


    ..you are certain that's all it does? echo the input? You can't actually [i]do[/i] anything with it?



  • It appears to have been written with http://www.dialogscript.com/ 



    The syntax looks like what would happen if VB and COBOL had a baby, and it was born retarded.



  • Everyone missed the best part.  If you look under "Last Company News"

    April 9, 2005 updated version with minor bug fixes
    March 5, 2004 version 4.2 has been released
    January 19, 2003 version 4.1 has been released.



  • I like the chick though. Maybe that's how they got their sales. Geeks falling for a geek girl with a laptop



  • But it gets even better.  Check out the System Utilities
    tab.  And the Company tab, which contains this gem: "For over
    three years, VisorSoft Software has been determined to produce
    high-quality, professional software for a reasonable, low, and
    affordable price for our clients. We are proud to say that we have
    reached that goal.".  Not bad, only took them 3 years.  I
    wonder how their customers for the first two and half years feel about
    it.



  • And for the finale, click on the search icon and try searching for PHP.



  • Since I was bored:
    http://rsynnott.com/stuff/magic.php

    Mine is better, as it doesn't break on the dollar symbol.



  • @rsynnott said:

    Hmm, also, most browsers don't seem to know what
    'puce' is. This disappoints me, as I'm sure I saw it on a list of named
    colours for netscape a few years ago...




    puke is spelt with a 'k', not a 'c'  [:P]




  • @LazyJones said:

    Early waiting for version 5
    I've heard rumors that this feature is implemented:

    for($i=0;$i<$spaces;$i++) {
     echo " "
    }

    I hear they are completely rewriting thier conversion engine to imporve it's speed too.

    <html>
    <body>
    <h1>Got PHP?</h1>
    </body>
    </html>

    will be converted to...

    ?>
    <html>
    <body>
    <h1>Got PHP?</h1>
    </body>
    </html>

    <?



  • Wow! Now I wont have to learn PHP.



  • People will buy anything.

    What's will all the echo statments?  Why didn't they just this:

    <?
    ?>
    [insert HTML]
    <?
    ?>



  • @paranoidgeek said:

    It appears to have been written with http://www.dialogscript.com/ 



    The syntax looks like what would happen if VB and COBOL had a baby, and it was born retarded.


    Seen on that website:

    "<font style="font-size: 12px; color: rgb(0, 0, 0);" face="Arial,Helvetica" size="2"><font style="font-size: 14px;" size="3"><font style="font-size: 12px;" size="2">You don't need a 4 year degree or a pHd to learn and understand Visual DialogScript!"

    pHd?! Acidity daemon or was this typed in all caps and some used the swap case function?</font></font></font>



  • Also on that web site:


    Question:
    I want to write a script program to do something and I don't know how to start. Are there any books or other examples I could look at?.

    Answer:
    The best place to start looking for further information about using Visual DialogScript is right here in the extensive support section of this site. You will find User Mailing List and Message Boards, IRC Chat Rooms and other forms of support that can aid you in your learning or continued efforts of programming with Visual DialogScript.



  • It also runs off an ASP shopping cart.  I wonder if they wrote it in HTML and turned it into PHP, then ported it to ASP? 

    They also write custom software for as little as $90.  I wonder if they also have custom software in a can?


    I guess their marketting plan is, anyone who can't tell how useless it is, would be impressed with the useless program. 



  • Damn. It needs an update.  My file:
    "
    After being converted to PHP produced errors when viewed:

    Warning: Unexpected character in input: '' (ASCII=92) state=1 in out.php on line 6
    Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in out.php on line 6

    For those wondering, the code produced was:
    echo "\"\n";

    Also doesn't delimit $.



  • You know... I bet we could make a furtune writing another script for
    all their customers to convert the generated php back into HTML. :)



  • Hihi... what a heap of garbage. I decided to have a little competition with myself and wrote this thing from scatch in Delphi in under three hours. If anyone really, really wants it you can download it at www.xs4all.nl/~schudel/html2php.zip

    But, who really *wants* that? [:S]

    Maybe I should be careful about duplicating their interface but really, do they stand a chance in court? [:D]



  • Guess what I got out of their own homepage? I converted it with their "brillant" piece of software, and got this steaming pile of crap: Image Hosted by ImageShack.us



  • I have never seen anything so beautiful.



  • @OpBaI said:

    I fixed it. I hope the forum software won't fuck up code in THIS language... note that this code is optimized for speed, not for size... so the many + and - are not because of my laziness but they are loop unrolling ;) ++++++[->++++++++++<]>.+++.-------[-<++>]<.--------.++++++++.[-]++++++++ ++.[-]>>>>>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+ +++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++>++++++++++>+++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++>++++++++++++++++++++++++++++++++>+++++++++++++++++++ +++++++++++++++<<<<<<<<<<<<<>>>>>>>>.>.>.>.>.>.<<<<<<<<<<<<<,+[-<[-]><<[ -]>>[->>+<<]>>[-<+<+>>]<<<<+>>>----------[[-]<<<->>>]<[->>+<<]>>[-<+<+>> ]<<<+>>------------------------------------[[-]<<->>]<[->>+<<]>>[-<+<+>> ]<<<+>>----------------------------------[[-]<<->>]<[->>+<<]>>[-<+<+>>]< <<+>>------------------------------------------------------------------- -------------------------[[-]<<->>]<<<[[-]>>>>>.>.>.>.>.>.>.>.>.>.>.<<<< <<<<<<<<<<<>>[-]<<]>><[[-]>>>>.<<<<]>[.[-]],+]>>>>>.>.<<<<<<[-]>[-]<++++ ++++++.-[->+++++++<]>.-.<++++++++++.

    Don't you have a formatted or even commented version? I don't think this is how you developed it ;-)

    I know mentioning comments in relation to Brainfuck is like cursing in the church but still.



  • I am just gonna have to write a game in brainfuck.
    And then share the source. ;)



  • What about Malbolge instead: http://en.wikipedia.org/wiki/Malbolge_programming_language ?

    "Malbolge was so difficult to understand when it arrived that it took
    two years for the first Malbolge program to appear. The program was not
    even written by a human being: it was generated by a beam search algorithm designed by Andrew Cooke and implemented in Lisp."

    Sounds fun :)



  • @Zlodo said:

    What about Malbolge instead: http://en.wikipedia.org/wiki/Malbolge_programming_language ?

    "Malbolge was so difficult to understand when it arrived that it took
    two years for the first Malbolge program to appear. The program was not
    even written by a human being: it was generated by a beam search algorithm designed by Andrew Cooke and implemented in Lisp."

    Sounds fun :)


    I agree. That was a really nifty thing. Im gonna learn to use it.



  • Wow! What an unbelievable product.

    To give them a tiny bit of credit, however, they do claim to support SHTML -> php conversion, which is at least somewhat useful. I suspect it may replace #exec and #include directives with apropriate PHP code. Maybe they even support environment variables and other SSI functionality: http://httpd.apache.org/docs/1.3/howto/ssi.html

    No excuse for echo'ing the html file line by line in any case.



  • @Nand said:

    To give them a tiny bit of credit, however, they do claim to support SHTML -> php conversion, which is at least somewhat useful. I suspect it may replace #exec and #include directives with apropriate PHP code.


    How much credit is "a tiny bit"... considering they appear to be selling a PHP placebo in a shiny box and deserve some retribution, I don't feel much sympathy for their position. Cowboy programmers, consultants, snake-oil salesmen, whatever you want to call them they make everyone else look bad.



  • It doesn't just convert html to php -- it converts html to SHITTY php!



  • Wait, now... After finding this on Google, I'd like to add something
    about your rants here.  Search HTML to PHP converter on Google,
    and you'll find that there are some companies selling this CRAP for
    $19.95 and even $24.95!!  I ran across a demo and tested it only
    to learn it was a piece of crap.  I would REALLY like a PHP
    program that WORKS for a change, as I don't fully understand PHP yet
    myself to do what I would like to do with it.



  • @jbaakko said:

    I would REALLY like a PHP
    program that WORKS for a change, as I don't fully understand PHP yet
    myself to do what I would like to do with it.


    Please, jbaakko, don't take offence at the following.  It's not a pop at you directly, more at what I see as a prevalent mindset.  Here goes.

    This is the sort of attitude that leads to crappy code.  Replace PHP with $LANGUAGE_OF_CHOICE, add a few badly understood concepts into the mix, and you end up with stuff like the PHP injection stuff we've been discussing.  I'm not going to get 'down' on PHP, although IMO it's a tool that has somewhat outlived its usefulness.  Too many people think "I need a dynamic website", pull out the 'ole text editor and start hacking together crappy PHP/Perl/Ruby/.NET/whatever.

    Before you start coding anything serious in any language, you really need to understand how to program.  Autogenerated stuff is not going to help you do this.  The only thing that's going to help is experience.  If you are writing anything that faces the 'net, you also need an unhealthy dose of paranoia and an understanding of how and why systems get hacked, as well as a good understanding of usability, accessibility, standards, etc.

    Back in the day, people learned to program either through serious on the job training (I'm discounting school and university training here, most of that has to be 'unlearned') or by titting about with home computers.  Of the latter group, generally speaking the worst that could happen was a really bad game getting released.  These days people are cutting their programming teeth developing web applications, which have very serious overtones of security and usability.  I mean, just look at the fucking forum software we're using here...

    jbaakko - buy a book on the concepts underlying programming, and learn to program.    Then learn your $LANGUAGE_OF_CHOICE.  It takes time, but you'll thank yourself for it, and so will your future clients.

    Either that or install some generic CMS and learn to customise it.

    Rant off

    Simon


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.