Changeset 738400
- Timestamp:
- 07/09/2013 06:03:23 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mpulse-real-user-measurement/trunk/mpulse-real-user-measurement.php
r738380 r738400 50 50 if (isset($_POST['submit'])) { 51 51 $mp_key = trim($_POST['mpulse_api_key']); 52 $mp_pattern = '/ [A-Z0-9]{5}\-[A-Z0-9]{5}\-[A-Z0-9]{5}\-[A-Z0-9]{5}\-[A-Z0-9]{5}/';52 $mp_pattern = '/^([A-Z0-9]{5}-){4}[A-Z0-9]{5}$/'; 53 53 if (preg_match($mp_pattern, $mp_key)) { 54 54 update_option('mpulse_api_key', $mp_key); 55 55 echo "<div id=\"footer\" class=\"soasta_footer\"> <p>Your key has been updated.</p></div>"; 56 56 } else { 57 echo "<div id=\"footer\" class=\"soasta_footer\"> <p>Your API key is invalid! Format: A1A1A-B2B2B-C3C3C-D4D4D </p></div>";57 echo "<div id=\"footer\" class=\"soasta_footer\"> <p>Your API key is invalid! Format: A1A1A-B2B2B-C3C3C-D4D4Dl-E5E5E </p></div>"; 58 58 } 59 59 } … … 65 65 <h1>mPulse - Real User Measurement</h1> 66 66 67 <p>Please enter your API KEY below. This can be found in your domain configuration within mPulse. If you do not yet have an mPulse account, you can <a href="http://www.soasta.com/free" target=" new" title="Create a free mPulse account">set one up (For FREE!)</a></p>67 <p>Please enter your API KEY below. This can be found in your domain configuration within mPulse. If you do not yet have an mPulse account, you can <a href="http://www.soasta.com/free" target="_blank" title="Create a free mPulse account">set one up (For FREE!)</a></p> 68 68 <form method="post" action="" class="soasta_form"> 69 69 <input name="mpulse_api_key" type="text" id="mpulse_api_key" class="soasta_input" value="<?php echo get_option('mpulse_api_key');?>" maxlength="29" placeholder="A1A1A-B2B2B-C3C3C-D4D4D-E5E5E"/>
Note: See TracChangeset
for help on using the changeset viewer.