The code below can be added to a PHP ready web page to mimic the example above.
Copy and paste the code below just under the "body" tag in the web page. This code is responsible for grabbing the parameters from the address bar in the browser and setting up the packet size value.
<?php
if(isset($_GET['ps'])) { $ps = $_GET['ps']; } else { $ps = '50'; }
?>
|
Now copy and paste the code below where you want the table containing the packet size selection to go. Note the table widths etc may need adjusting to fit in with the web page being copied to.
<form method="get" action="capacitypacketsize.php">
<table width="900" cellpadding="5" cellspacing="1"><tr>
<td width="167">Choose UDP Packet Size:</td>
<td width="731">
<select name="ps" onChange="this.form.submit()">
<option>Choose Packet Size...</option>
<option id="size172" value="172" <?php if ($ps == "172") { echo "selected"; } ?>>172 kB</option>
<option id="size695" value="695" <?php if ($ps == "695") { echo "selected"; } ?>>695 kB</option>
<option id="size1390" value="1390" <?php if ($ps == "1390") { echo "selected"; } ?>>1390 kB</option>
</select>
</td>
</tr>
</table>
</form> |
|
Now copy and paste the code below where you want the applet to appear. The only change that will be needed is the codebase, highligted in blue below. This should be changed to the address of your MyConnection Server installation.
<applet mayscript name="mcs" code="myspeedserver/applet/myspeed.class" archive="/myspeed/myspeed_s_8.jar,/myspeed/plugins_s_8.jar" codebase="http://mcssjc.visualware.com/myspeed" width=600 height=400>
<param name="capacity_udppacketsize" value="<?php echo "$ps" ?>">
<param name="testspecid" value="-7">
<param name="permissions" value="all-permissions">
</applet> |
|
|