• Hello World

    From Jason@VERT/HDCAFE to All on Friday, November 15, 2013 00:05:09
    <?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 Friday, November 15, 2013 10:31:00
    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 Friday, November 15, 2013 18:57:05
    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 Saturday, November 16, 2013 00:54:36
    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 Saturday, November 16, 2013 03:48:49
    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 Saturday, November 16, 2013 03:51:33
    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 Saturday, November 16, 2013 09:03:00
    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 Saturday, November 16, 2013 09:05:00
    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 Saturday, November 16, 2013 09:10:00
    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 Saturday, November 16, 2013 14:44:33
    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 Saturday, November 16, 2013 14:44:57
    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 Monday, November 18, 2013 06:45:59
    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 Monday, November 25, 2013 00:31:21
    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 Thursday, November 28, 2013 08:28:25
    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 Thursday, November 28, 2013 14:28:42
    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 Friday, November 29, 2013 09:06:51
    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