The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Pass a variable to PHP Script when piping msg to that script?

Discussion in 'General Discussion' started by doni49, Mar 2, 2007.

  1. doni49

    doni49 Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    I'm piping messages to a PHP script. So far, it's working fine. There's one thing I'd like to add and then I think I've got the whole package of what I'm trying to accomplish done (or at least the hard stuff anyway).

    When writing a PHP script that will be accessed via the browser, I'm able to pass it variables and values as part of the URL and access them via the _GET global.

    How can I pass a variable when piping a message to that script? I'm guessing that I pass it like a command line arg so I'd have something like the following (I'm new to *nix so I may be wrong here):
     
  2. doni49

    doni49 Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    OK--I think I got it.

    argc is the num of args & argv is an array of args--correct?

    I'm out right now--I'll try this when I get home.
     
Loading...

Share This Page