#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    39
    Rep Power
    0

    Help with some function public?? not sure


    I am using S2Member Pro to do some stuff.

    I came across this:

    PHP Code:
    add_s2member_sig()
    public static 
    str add_s2member_sig(str $url_uri_querystr $sig_var)

    Adds an s2Member-generated signature onto a full URLa partial URI, or just a query string.

    Since:

        
    111106
    Parameters
    :

        
    str $url_uri_query A full URLa partial URI, or just a query stringto append the s2Member-generated signature onto.

        
    str $sig_var OptionalThe name of the s2Member-generated signature variableDefaults to _s2member_sig.
    Returns:

        
    str A full URLa partial URI, or just a query stringwith an s2Member-generated signature
    I have not heard of "public", so I don't know how to use this.
    Can you tell me what to do with this:
    PHP Code:
    public static str add_s2member_sig(str $url_uri_querystr $sig_var
    how to call it in Php...

    is it like this:
    PHP Code:
    $_oldurl "http://domain.com/";
    $newUrl = public static str add_s2member_sig(str $url_uri_querystr $_oldurl); 
    because no matter what I do, I cannot get the PHP to execute. I don't see any errors, but it just does not seem to work.

    Anyone know how to use that type of code?
    I would really appreciate your knowledge.
    Thank you very much in advance.
    Rich
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1046
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    39
    Rep Power
    0

    [resolved]


    I found it!

    It is a static code, to be used like this:

    PHP Code:
    c_ws_plugin__s2member_utils_urls::add_s2member_sig() 
    that worked.

    wow, I cannot believe how hard that was for me to figure it out. Geeze louise!

    Anyhow, thank you...

IMN logo majestic logo threadwatch logo seochat tools logo