English   German
  #1  
Old 03-06-2003, 05:26
PrimalFear PrimalFear is offline
-= TeamSpeak User =-
 
Join Date: Mar 2003
Location: San Francisco
Posts: 27
PrimalFear is on a distinguished road
Send a message via AIM to PrimalFear
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.
Reply With Quote
  #2  
Old 08-06-2003, 00:55
PrimalFear PrimalFear is offline
-= TeamSpeak User =-
 
Join Date: Mar 2003
Location: San Francisco
Posts: 27
PrimalFear is on a distinguished road
Send a message via AIM to PrimalFear
Anybody
Reply With Quote
  #3  
Old 08-06-2003, 20:44
PrimalFear PrimalFear is offline
-= TeamSpeak User =-
 
Join Date: Mar 2003
Location: San Francisco
Posts: 27
PrimalFear is on a distinguished road
Send a message via AIM to PrimalFear
bump
Reply With Quote
  #4  
Old 11-06-2003, 11:42
Exo Exo is offline
-= TeamSpeak User =-
 
Join Date: Jun 2003
Location: Germany
Posts: 2
Exo is on a distinguished road
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"]);

Reply With Quote
  #5  
Old 11-06-2003, 22:56
PrimalFear PrimalFear is offline
-= TeamSpeak User =-
 
Join Date: Mar 2003
Location: San Francisco
Posts: 27
PrimalFear is on a distinguished road
Send a message via AIM to PrimalFear
Thank you, can you tell me in which php file I would add this?
Reply With Quote
  #6  
Old 12-06-2003, 16:13
Exo Exo is offline
-= TeamSpeak User =-
 
Join Date: Jun 2003
Location: Germany
Posts: 2
Exo is on a distinguished road
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.
Reply With Quote
  #7  
Old 28-08-2003, 22:36
Spudster Spudster is offline
-= TeamSpeak Lover =-
 
Join Date: May 2003
Location: USA
Posts: 36
Spudster is on a distinguished road
Does anyone know if this actually works?
Reply With Quote
  #8  
Old 24-10-2003, 23:04
Spudster Spudster is offline
-= TeamSpeak Lover =-
 
Join Date: May 2003
Location: USA
Posts: 36
Spudster is on a distinguished road
Still looking to see if anyone has been able to accomplish this.

Many Thanks,

Spudster
Reply With Quote
  #9  
Old 26-11-2003, 22:37
Spudster Spudster is offline
-= TeamSpeak Lover =-
 
Join Date: May 2003
Location: USA
Posts: 36
Spudster is on a distinguished road
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!
Reply With Quote
  #10  
Old 20-02-2004, 22:48
Spudster Spudster is offline
-= TeamSpeak Lover =-
 
Join Date: May 2003
Location: USA
Posts: 36
Spudster is on a distinguished road
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 ($chCURLOPT_URL$remote_url); 
    
curl_setopt ($chCURLOPT_RETURNTRANSFER1); 
    
curl_setopt ($chCURLOPT_POST1); 
    
curl_setopt ($chCURLOPT_POSTFIELDS$postquery); 
    
ob_start(); 
    
curl_exec ($ch); 
    
curl_close ($ch); 
    
$curl_results ob_get_contents(); 
    echo 
$curl_results;
    
ob_end_clean(); 
};

?>
Reply With Quote
  #11  
Old 11-03-2004, 06:26
SARO91201 SARO91201 is offline
-= TeamSpeak User =-
 
Join Date: Mar 2004
Location: Olympia, WA
Posts: 2
SARO91201 is on a distinguished road
Send a message via AIM to SARO91201 Send a message via Yahoo to 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?
Reply With Quote
  #12  
Old 11-03-2004, 16:52
Spudster Spudster is offline
-= TeamSpeak Lover =-
 
Join Date: May 2003
Location: USA
Posts: 36
Spudster is on a distinguished road
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
Reply With Quote
  #13  
Old 11-03-2004, 23:56
SARO91201 SARO91201 is offline
-= TeamSpeak User =-
 
Join Date: Mar 2004
Location: Olympia, WA
Posts: 2
SARO91201 is on a distinguished road
Send a message via AIM to SARO91201 Send a message via Yahoo to SARO91201
I already have curl installed and running as I have to have it for my modernbill that I already use.
Reply With Quote
  #14  
Old 12-03-2004, 17:15
Spudster Spudster is offline
-= TeamSpeak Lover =-
 
Join Date: May 2003
Location: USA
Posts: 36
Spudster is on a distinguished road
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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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