• Hello World

    From Jason@VERT/HDCAFE to All on Fri Nov 15 08:05:09 2013
    <?php

    echo("Hello World!");



    Anyone do anything with PHP programming here? I need to try and setup PHP to work with Synchronet. I'm one powerful man with PHP. There isn't
    anything that I can do with it... Same with .NET.. So whats the haps? :)

    Jason


    ---
    þ Synchronet þ The Hard Drive Cafe BBS is BACK! telnet://bbs.hdcbbs.com
  • From Dreamer@VERT/SETXBBS to Jason on Fri Nov 15 18:31:00 2013
    Jason wrote to All <=-

    Anyone do anything with PHP programming here? I need to try and setup
    PHP to work with Synchronet. I'm one powerful man with PHP. There
    isn't anything that I can do with it... Same with .NET.. So whats the haps? :)

    I've dabbled a little bit with it, have it configured in case it comes
    in handy.

    http://ftp.synchro.net/howto:php will get you started.

    Since we're on the subject, I've got a script in PHP I'd like to set
    up, and I was wondering if there's a way to get information from a
    variable in PHP to a variable in SSJS? I was working on this last
    week, and haven't been able to dig too deeply in it yet.


    --- MultiMail/Linux v0.49
    þ Synchronet þ Sovereign State BBS
  • From Nightfox@VERT/DIGDIST to Dreamer on Sat Nov 16 02:57:05 2013
    Re: Re: Hello World
    By: Dreamer to Jason on Fri Nov 15 2013 10:31:00

    Since we're on the subject, I've got a script in PHP I'd like to set
    up, and I was wondering if there's a way to get information from a variable in PHP to a variable in SSJS? I was working on this last
    week, and haven't been able to dig too deeply in it yet.

    I've been using PHP with my Synchronet web server for a while now, and I haven't found a way to do that yet.. Not sure if you can, since the PHP and SSJS environments are separate and distinct, so they don't see each other (as far as I know).

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Jason@VERT/HDCAFE to Nightfox on Sat Nov 16 08:54:36 2013
    Re: Re: Hello World
    By: Nightfox to Dreamer on Fri Nov 15 2013 06:57 pm


    I've been using PHP with my Synchronet web server for a while now, and I haven't found a way to do that yet.. Not sure if you can, since the PHP
    and SSJS environments are separate and distinct, so they don't see each other (as far as I know).

    Nightfox

    In my coding, I haven't been able to make javascript and php work well with each other because php is processed on the server end. The solution to
    that though was using javascript and ajax to make calls back to a callback php file so that way i could manage and process data on the server and
    deliver the results back to the browser.. I'm sure in a situation like this, something could be done with ajax to pull variables back from the ssjs
    side, or vice versa, using ssjs and ajax you could pull back some processed results from a php file and display it on the webpage.

    I believe, in programming and development, where there is a will, there is a way. It's only a matter of time before you figure it out!

    Jason


    ---
    þ Synchronet þ The Hard Drive Cafe BBS is BACK! telnet://bbs.hdcbbs.com
  • From Khelair@VERT/TINFOIL to Jason on Sat Nov 16 11:48:49 2013
    Re: Hello World
    By: Jason to All on Fri Nov 15 2013 00:05:09

    Anyone do anything with PHP programming here? I need to try and setup PHP t anything that I can do with it... Same with .NET.. So whats the haps? :)

    There are all kinds of good things that you can do with it, once you get past the hatred of it not having any sort of handling for stdout, stderr, or other appropriate channels. I would've been working with it a lot more, but I got hung up on one of those necessity kinds of things and didn't have the time to pursue my passion for coding. :| When I had a good opportunity land in my lap for PHP development, I'd not progressed to the point in PHP's evolution as a language where it became 'allegedly' object oriented. So I kind of fumbled that one, alas. There was also an interpersonal faux pas, as well.
    What do you want to do with it? I might be able to help a little bit. I don't know much, but where my knowledge ends I'll gladly dive in and expand it a little more if it's beneficial vis a vie mein prodgeny, por dios.
    Adios y ciao. Muchas gracias, too. It's good to see people working with it.

    -- Greetings, NSA, and best wishes


    ---
    þ Synchronet þ Tinfoil Tetrahedron : telnet bismaninfo.hopto.org 8023 : http:8080
  • From Khelair@VERT/TINFOIL to Dreamer on Sat Nov 16 11:51:33 2013
    Re: Re: Hello World
    By: Dreamer to Jason on Fri Nov 15 2013 10:31:00

    Since we're on the subject, I've got a script in PHP I'd like to set
    up, and I was wondering if there's a way to get information from a
    variable in PHP to a variable in SSJS? I was working on this last
    week, and haven't been able to dig too deeply in it yet.

    This little nugget might be of some usage to your endeavors, my friend: http://php.net/manual/en/book.sockets.php. Peace be with you, etc etc
    etc, ad infinitum...

    -- Greetings, NSA, and best wishes


    ---
    þ Synchronet þ Tinfoil Tetrahedron : telnet bismaninfo.hopto.org 8023 : http:8080
  • From Dreamer@VERT/SETXBBS to Nightfox on Sat Nov 16 17:03:00 2013
    Nightfox wrote to Dreamer <=-

    Since we're on the subject, I've got a script in PHP I'd like to set
    up, and I was wondering if there's a way to get information from a variable in PHP to a variable in SSJS? I was working on this last
    week, and haven't been able to dig too deeply in it yet.

    I've been using PHP with my Synchronet web server for a while now, and
    I haven't found a way to do that yet.. Not sure if you can, since the
    PHP and SSJS environments are separate and distinct, so they don't see each other (as far as I know).

    That's what I've been thinking, too. I suppose I could work around
    that... perhaps use a temporary file. Doesn't have to be super fast.


    --- MultiMail/Linux v0.49
    þ Synchronet þ Sovereign State BBS
  • From Dreamer@VERT/SETXBBS to Jason on Sat Nov 16 17:05:00 2013
    Jason wrote to Nightfox <=-

    I've been using PHP with my Synchronet web server for a while now, and I haven't found a way to do that yet.. Not sure if you can, since the PHP
    and SSJS environments are separate and distinct, so they don't see each other (as far as I know).

    Nightfox

    In my coding, I haven't been able to make javascript and php work well with each other because php is processed on the server end. The
    solution to that though was using javascript and ajax to make calls
    back to a callback php file so that way i could manage and process data
    on the server and deliver the results back to the browser.. I'm sure in
    a situation like this, something could be done with ajax to pull
    variables back from the ssjs side, or vice versa, using ssjs and ajax
    you could pull back some processed results from a php file and display
    it on the webpage.

    I don't think we'd need to bring AJAX in, as both environments in this
    case are on the server. Perhaps it's faster...I wouldn't know...but
    I'm just starting out, so I gotta KISS. ;)


    --- MultiMail/Linux v0.49
    þ Synchronet þ Sovereign State BBS
  • From Dreamer@VERT/SETXBBS to Khelair on Sat Nov 16 17:10:00 2013
    Khelair wrote to Dreamer <=-

    Re: Re: Hello World
    By: Dreamer to Jason on Fri Nov 15 2013 10:31:00

    Since we're on the subject, I've got a script in PHP I'd like to set
    up, and I was wondering if there's a way to get information from a
    variable in PHP to a variable in SSJS? I was working on this last
    week, and haven't been able to dig too deeply in it yet.

    This little nugget might be of some usage to your endeavors, my friend: http://php.net/manual/en/book.sockets.php. Peace be with you,
    etc etc etc, ad infinitum...

    Yeah, I thought about using sockets, but it seems overkill to me at
    the moment. Speed is not critical, and simplicity is important at the
    moment. Once I get a working draft running, I could implement
    refinements.



    --- MultiMail/Linux v0.49
    þ Synchronet þ Sovereign State BBS
  • From Nightfox@VERT/DIGDIST to Dreamer on Sat Nov 16 22:44:33 2013
    Re: Re: Hello World
    By: Dreamer to Nightfox on Sat Nov 16 2013 09:03:00

    I've been using PHP with my Synchronet web server for a while now,
    and I haven't found a way to do that yet.. Not sure if you can,
    since the PHP and SSJS environments are separate and distinct, so
    they don't see each other (as far as I know).

    That's what I've been thinking, too. I suppose I could work around that... perhaps use a temporary file. Doesn't have to be super fast.

    Using a temporary file would work.

    I think Khelair may have also been onto something with his sockets suggestion. It reminded me of a solution I seem to remember hearing about some time ago.. I suppose it might be possible to set up a page in either SSJS or PHP (or both) that could be used to exchange information - Then the PHP pages could make a connection to localhost to query for certain data values (or vice versa, the SSJS pages could query for some information served up by the PHP pages).

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Dreamer on Sat Nov 16 22:44:57 2013
    Re: Re: Hello World
    By: Dreamer to Jason on Sat Nov 16 2013 09:05:00

    I'm just starting out, so I gotta KISS. ;)

    KISS early and often.. :P

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Khelair@VERT/TINFOIL to Dreamer on Mon Nov 18 14:45:59 2013
    Re: Re: Hello World
    By: Dreamer to Khelair on Sat Nov 16 2013 09:10:00

    Yeah, I thought about using sockets, but it seems overkill to me at
    the moment. Speed is not critical, and simplicity is important at the moment. Once I get a working draft running, I could implement
    refinements.

    Would passing it through a temporary file be too much?

    -- Greetings, NSA, and best wishes


    ---
    þ Synchronet þ Tinfoil Tetrahedron : telnet bismaninfo.hopto.org 8023 : http:8080
  • From Jason@VERT/HDCAFE to Nightfox on Mon Nov 25 08:31:21 2013
    Re: Re: Hello World
    By: Nightfox to Dreamer on Fri Nov 15 2013 06:57 pm

    Re: Re: Hello World
    By: Dreamer to Jason on Fri Nov 15 2013 10:31:00

    Since we're on the subject, I've got a script in PHP I'd like to set up, and I was wondering if there's a way to get information from a variable in PHP to a variable in SSJS? I was working on this last week, and haven't been able to dig too deeply in it yet.

    I've been using PHP with my Synchronet web server for a while now, and I haven't found a way to do that yet.. Not sure if you can, since the PHP
    and SSJS environments are separate and distinct, so they don't see each other (as far as I know).

    Nightfox


    Since we last talked, I have begun writing a library that will import the synchronet variables from JavaScript and have them as variables in PHP. So far I have quite a few variables from Synchronet available in PHP.

    Jason


    ---
    þ Synchronet þ The Hard Drive Cafe BBS is BACK! telnet://bbs.hdcbbs.com
  • From Nightfox@VERT/DIGDIST to Jason on Thu Nov 28 16:28:25 2013
    Re: Re: Hello World
    By: Jason to Nightfox on Mon Nov 25 2013 00:31:21

    Since we last talked, I have begun writing a library that will import
    the synchronet variables from JavaScript and have them as variables in PHP. So far I have quite a few variables from Synchronet available in
    PHP.

    That sounds interesting. I could probably make use of something like that.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com
  • From Jason@VERT/HDCAFE to Nightfox on Thu Nov 28 22:28:42 2013
    Re: Re: Hello World
    By: Nightfox to Jason on Thu Nov 28 2013 08:28 am

    Since we last talked, I have begun writing a library that will import the synchronet variables from JavaScript and have them as variables in PHP. So far I have quite a few variables from Synchronet available in PHP.

    That sounds interesting. I could probably make use of something like that.

    Nightfox

    You can look at it... Right now it's not much, but I have a test index.php page
    that will show the information in JSON format, then it will show it as a PHP array. http://hdcbbs.com/test/index.php

    I have done all of the system variables, and now i am working on a way to do the user variables so i could write a login routine for someone to logon to the
    bbs from .php and have all their user variables available just like when they login thru the ssjs login.

    Again, it's a work in progress but once i get those variables done, i will zip it all up and make it available for download.

    Jason


    ---
    þ Synchronet þ The Hard Drive Cafe BBS is BACK! telnet://bbs.hdcbbs.com
  • From Nightfox@VERT/DIGDIST to Jason on Fri Nov 29 17:06:51 2013
    Re: Hello World
    By: Jason to All on Fri Nov 15 2013 00:05:09

    <?php

    echo("Hello World!");



    I like the LOLCode version of Hello World (called Hai World):

    HAI
    CAN HAS STDIO?
    VISIBLE "HAI WORLD!"
    KTHXBYE

    Nightfox

    ---
    þ Synchronet þ Digital Distortion BBS - digitaldistortionbbs.com