|
|
|

03-06-2003, 05:26
|
|
-= TeamSpeak User =-
|
|
Join Date: Mar 2003
Location: San Francisco
Posts: 27
|
|
|
Pointing to more than one webpost?
Is it possible to point to more than one website in the server.ini file, I saw it mentioned somewhere but cant find the post, cant remember if it was posible or not.
Many Regards Primal.
|

08-06-2003, 00:55
|
|
-= TeamSpeak User =-
|
|
Join Date: Mar 2003
Location: San Francisco
Posts: 27
|
|
|
Anybody
|

08-06-2003, 20:44
|
|
-= TeamSpeak User =-
|
|
Join Date: Mar 2003
Location: San Francisco
Posts: 27
|
|
|
bump
|

11-06-2003, 11:42
|
|
-= TeamSpeak User =-
|
|
Join Date: Jun 2003
Location: Germany
Posts: 2
|
|
IIRC it isn't currently possible with TS itself. But you could point to a webpost which delivers the data to different webposts.
The essential code in PHP would be something like this (untested!)
PHP Code:
$uris = array(
"http://domain1.com/webpost.php",
"http://domain2.com/webpost.php",
"http://domain3.com/webpost.php",
);
foreach ($uris as $uri) {
@readfile($uri."?".$_SERVER["QUERY_STRING"]);
}
|

11-06-2003, 22:56
|
|
-= TeamSpeak User =-
|
|
Join Date: Mar 2003
Location: San Francisco
Posts: 27
|
|
|
Thank you, can you tell me in which php file I would add this?
|

12-06-2003, 16:13
|
|
-= TeamSpeak User =-
|
|
Join Date: Jun 2003
Location: Germany
Posts: 2
|
|
|
This code needs to be in its own PHP file, e.g. dispatch.php . The TS Server would then point to this file in its webpost configuration.
|

28-08-2003, 22:36
|
|
-= TeamSpeak Lover =-
|
|
Join Date: May 2003
Location: USA
Posts: 36
|
|
|
Does anyone know if this actually works?
|

24-10-2003, 23:04
|
|
-= TeamSpeak Lover =-
|
|
Join Date: May 2003
Location: USA
Posts: 36
|
|
|
Still looking to see if anyone has been able to accomplish this.
Many Thanks,
Spudster
|

26-11-2003, 22:37
|
|
-= TeamSpeak Lover =-
|
|
Join Date: May 2003
Location: USA
Posts: 36
|
|
Anyone?
Here's what I've got.....
PHP Code:
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<?php
$uris = array(
"http://www.webpost1.com/webpost.php",
"http://www.webpost2.com/webpost.php",
"http://www.webpost3.com/webpost.php",
"http://www.webpost4.com/webpost.php"
);
foreach ($uris as $uri) (
@readfile($uri."?".$_SERVER["QUERY_STRING"])
)
?>
</body>
</html>
It doesn't work, can someone fill me in on the details why? I have substituted the www.webpost1.com addresses in the actual script.
Thanks!
|

20-02-2004, 22:48
|
|
-= TeamSpeak Lover =-
|
|
Join Date: May 2003
Location: USA
Posts: 36
|
|
|
I figured it out
After many brain throbing nights, here's how to make it work.
You will need to make sure your webserver & PHP have cURL installed and running for it to work. I named it pushpost.php and pointed my webserver to it, then it replicates the information out to more than one webpost.
-Spudster
PHP Code:
<?php
// gather the incoming data from the Teamspeak Server.
$server_adminemail = urlencode($_REQUEST['server_adminemail']);
$server_isplinkurl = urlencode($_REQUEST['server_isplinkurl']);
$server_linkurl = urlencode($_REQUEST['server_linkurl']);
$server_name = urlencode($_REQUEST['server_name']);
$server_ispname = urlencode($_REQUEST['server_ispname']);
$server_ispcountry = urlencode($_REQUEST['server_ispcountry']);
$server_password = urlencode($_REQUEST['server_password']);
$server_port = $_REQUEST["server_port"];
$server_platform = $_REQUEST['server_platform'];
$server_version_major = $_REQUEST['server_version_major'];
$server_version_minor = $_REQUEST['server_version_minor'];
$server_version_release = $_REQUEST['server_version_release'];
$server_version_build = $_REQUEST['server_version_build'];
$server_uptime = $_REQUEST['server_uptime'];
$server_type1 = $_REQUEST['server_type1'];
$server_type2 = $_REQUEST['server_type2'];
$clients_current = $_REQUEST['clients_current'];
$clients_maximum = $_REQUEST['clients_maximum'];
$channels_current = $_REQUEST['channels_current'];
$server_queryport = $_REQUEST['server_queryport'];
// Determine the server's IP Address
if (getenv("HTTP_X_FORWARDED_FOR")) {
$server_ip = getenv("HTTP_X_FORWARDED_FOR");
if ($server_ip == '') {
$server_ip = $_SERVER["REMOTE_ADDR"];
}
$server_ip = preg_replace( "/,.*$/", "", $server_ip );
} else {
$server_ip = getenv("REMOTE_ADDR");
if ($server_ip == '') {
$server_ip = $_SERVER["REMOTE_ADDR"];
}
}
// Organize the new _POST
$postquery = "server_ip=$server_ip&server_port=$server_port&server_adminemail=$server_adminemail&server_isplinkurl=$server_isplinkurl&server_linkurl=$server_linkurl&server_name=$server_name&server_ispname=$server_ispname&server_ispcountry=$server_ispcountry&server_password=$server_password&server_platform=$server_platform&server_version_major=$server_version_major&server_version_minor=$server_version_minor&server_version_release=$server_version_release&server_version_build=$server_version_build&server_uptime=$server_uptime&server_type1=$server_type1&server_type2=$server_type2&clients_current=$clients_current&clients_maximum=$clients_maximum&channels_current=$channels_current&server_queryport=$server_queryport";
// Set Array of sites to post to
$uris = array(
"http://www.somewebsite1.com/webpost.php",
"http://www.somewebsite2.com/webpost.php",
"http://www.somewebsite3.com/webpost.php",
);
// Loop to execute posts (Requites cURL to be installed and running)
foreach ($uris as $uri) {
$ch = curl_init();
$remote_url = $uri;
curl_setopt ($ch, CURLOPT_URL, $remote_url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postquery);
ob_start();
curl_exec ($ch);
curl_close ($ch);
$curl_results = ob_get_contents();
echo $curl_results;
ob_end_clean();
};
?>
|

11-03-2004, 06:26
|
|
-= TeamSpeak User =-
|
|
Join Date: Mar 2004
Location: Olympia, WA
Posts: 2
|
|
|
ok I just tried that script and I get this error message:
Fatal error: Call to undefined function: curl_init() in /home3/beer/public_html/*****/ts2/webpost2.php on line 52
How do I fix this?
|

11-03-2004, 16:52
|
|
-= TeamSpeak Lover =-
|
|
Join Date: May 2003
Location: USA
Posts: 36
|
|
Quote:
Originally posted by SARO91201
ok I just tried that script and I get this error message:
Fatal error: Call to undefined function: curl_init() in /home3/beer/public_html/*****/ts2/webpost2.php on line 52
How do I fix this?
|
You will need to have cURL installed on your webserver. You can download it from http://curl.haxx.se/download.html
This is the magic item that makes the script work.
Good Luck - Spudster
|

11-03-2004, 23:56
|
|
-= TeamSpeak User =-
|
|
Join Date: Mar 2004
Location: Olympia, WA
Posts: 2
|
|
|
I already have curl installed and running as I have to have it for my modernbill that I already use.
|

12-03-2004, 17:15
|
|
-= TeamSpeak Lover =-
|
|
Join Date: May 2003
Location: USA
Posts: 36
|
|
I dont think cURL is installed by dedfault with modernbill. refer to http://manual.modernbill.com/adminhe...cURL_Setup.htm maybe this can help.
I am running cURL on a WIN2K server. I had to manually install cURL to work with PHP.
Thanks,
Spudster
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 00:11.
Powered by vBulletin® Version 3.7.3 Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
|
|
|
|
Add to Bookmarks
|
Printview
|
Contact Us
|
Legal Notices
|