3v4l.org

run code in 300+ PHP versions simultaneously
<?php $op["op"] = "create_user"; // The Remote Operation. $op["api_key"] = "6aa4dc3fad948b3146a819ca2e500d5e"; // Check your Dashboard for this value. // See: `s2Member → API / Scripting → Remote Operations API → API Key` $op["data"] = array( "user_login" => "50165", // Required. A unique Username. Lowercase alphanumerics/underscores. "user_email" => "ritehammill-7086@yopmail.com", // Required. A valid/unique Email Address for the new User. // These additional details are 100% completely optional. "modify_if_login_exists" => "1", // Optional. Update/modify if ``user_login`` value already exists in the database? // A non-zero value tells s2Member to update/modify an existing account with the details you provide, if this Username already exists. "user_pass" => "12345678", // Optional. Plain text Password. If empty, this will be auto-generated. "first_name" => "Saúl", // Optional. First Name for the new User. "last_name" => "Muñiz", // Optional. Last Name for the new User. "s2member_level" => "1", // Optional. Defaults to Level #0 (a Free Subscriber). "s2member_ccaps" => "D01,32,24", // Optional. Comma-delimited list of Custom Capabilities. "s2member_registration_ip" => "::1", // Optional. User's IP Address. If empty, s2Member will fill this upon first login. "s2member_subscr_gateway" => "CASH", // Optional. User's Paid Subscr. Gateway Code. One of: (paypal|alipay|authnet|ccbill|clickbank|google). "s2member_subscr_id" => "I-DJASODJF8933J", // Optional. User's Paid Subscr. ID. For PayPal®, use their Subscription ID, or Recurring Profile ID. "s2member_custom" => "www.wealthgenerators.net/50165", // Optional. If provided, should always start with your installation domain name (i.e., $_SERVER["HTTP_HOST"]). "s2member_auto_eot_time" => "2016-07-21", // Optional. Can be any value that PHP's ``strtotime()`` function will understand (i.e., YYYY-MM-DD). "custom_fields" => array("gen_id" => "50165"), // Optional. An array of Custom Registration/Profile Field ID's, with associative values. "s2member_notes" => "New enrolled (Saúl_Muñiz)", // Optional. Administrative notations. "opt_in" => "1", // Optional. A non-zero value tells s2Member to attempt to process any List Servers you've configured in the Dashboard area. // This may result in your mailing list provider sending the User/Member a subscription confirmation email (i.e., ... please confirm your subscription). "notification" => "1", // Optional. A non-zero value tells s2Member to email the new User/Member their Username/Password. // The "notification" parameter also tells s2Member to notify the site Administrator about this new account. ); echo serialize('ú'); //echo urlencode (serialize ($op)); //$post_data = stream_context_create (array("http" => array("method" => "POST", "header" => "Content-type: application/x-www//-form-urlencoded", "content" => "s2member_pro_remote_op=" . urlencode (serialize ($op))))); //$result = trim (file_get_contents ("http://inspiredmediadev.com/xirect/?s2member_pro_remote_op=1", false, $post_data)); //if (!empty($result) && !preg_match ("/^Error\:/i", $result) && is_array($user = @unserialize ($result))) //echo "Success. New User created with ID: " . $user["ID"]; //else //echo "API error reads: " . $result; ?>

preferences:
52.72 ms | 402 KiB | 5 Q