help php

For general discussion of the Poker Mavens software

help php

Postby gringocode3 » Mon Jun 21, 2010 2:11 pm

I am layman in the subject and would like some help, I'll spend my ip and password,
so that someone can help me complete the example below.

Thanks!
if possible send e-mail: [email protected]

http://187.44.16.178:8087/
password: 123456





<html>
<body>
<?php

include "API.php"; // $url, $pw, and Poker_API() defined here

if (isset($_REQUEST["submit"])) // page loaded via submit button
{

// split out date and tourney name from selected value

$tourney = stripslashes($_REQUEST["tourney"]);

$trdate = Substr($tourney,0,10);
$trname = Substr($tourney,12);

// retrieve file

$params = "Password=" . $pw . "&Command=TournamentsResults&Date=" . $trdate . "&Name=" . urlencode($trname);
$api = Poker_API($url,$params,false);

// check for error

if ($api[0] == "Result=Error") die($api[1]);

// display results

echo "<pre>\n";
for ($i=1; $i<count($api); $i++) echo $api[$i] . "\n";
echo "</pre>\n";
}
else // initial page load
{

// retrieve list of files

$params = "Password=" . $pw . "&Command=TournamentsResults";
$api = Poker_API($url,$params,true);

// check for error

if ($api["Result"] == "Error") die($api["Error"]);

// fill droplist with dates and tourney names

$count = $api["Files"];
echo "<h3>Tournament Results</h3>\n";
echo "<form method='post'>\n";
echo "<select name='tourney'>\n";
for ($i=1; $i<=$count; $i++)
{
$tr = $api["Date" . $i] . " " . htmlspecialchars($api["Name" . $i],ENT_QUOTES);
echo "<option value='" . $tr . "'>" . $tr . "</option>\n";
}

// submit button reloads page with selected file info

echo "</select> &nbsp; <input type='submit' name='submit' value='Submit'>\n";
echo "</form>\n";
echo "<p>Files found: " . $count . "</p>\n";
}

?>
</body>
</html>
gringocode3
 
Posts: 2
Joined: Mon Jun 21, 2010 2:06 pm

Re: help php

Postby Kent Briggs » Mon Jun 21, 2010 7:49 pm

Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3764
Joined: Wed Mar 19, 2008 8:47 pm

Re: help php

Postby gringocode3 » Thu Jun 24, 2010 8:23 am

I'm having trouble, do not know php. Someone can complete the example with the ip and password I provided so I can test?

thanks
gringocode3
 
Posts: 2
Joined: Mon Jun 21, 2010 2:06 pm

Re: help php

Postby Kent Briggs » Thu Jun 24, 2010 1:33 pm

It's pretty self-explanatory. The example shows this:

Code: Select all
 
$url = "http://192.168.1.100:8087/api";     // <-- use your game server IP
$pw = "my_api_password";                    // <-- use your api password


And you said your info was this:

http://187.44.16.178:8087/
password: 123456

So just replace the example info with yours:

Code: Select all
$url = "http://187.44.16.178:8087/api";
$pw = "123456";
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3764
Joined: Wed Mar 19, 2008 8:47 pm


Return to General

Who is online

Users browsing this forum: No registered users and 9 guests

cron