How to get E+ Spider on your website
Hello everyone and good evening,
I have a question about using E+ Spider on our own website (LINK).First of all, i have tried to search on the forum. But with no results. Searching via Google works for me, so i came here at this threat (LINK) (old threat, but i gave it a try to checking it out).
I downloaded the E+ Spider Equery.zip file from that threat, and followed the steps like he said in his post.Afther uploaded the files:
FOLDER
- flags
- iconos
- img
- maps
- SpryAssets
- index.php
- quake3.php
- showvars.php
X and mine, and all who have the excessive plus servers spider, its working under the same system, (excessiveplus.net).excessiveplus.net, generates a "database", and keep a copy on the server,so all who know a bit of Php, can get that "database" work in a good look, i mean, with images etc....
So i think, atm there's not better Spider than the original one done by Excessiveplus team.
All others are simply copys , about the Query to the server, you can find on the internet a lot information to how do that, but yes, it will work for one server, not like the spider (master servers), well, ill explain better...
to have a Spider,
you should have a MASTER SERVER IP, like master0.excessiveplus.net , so you code a bit in PHP and you will get all excessiveplus servers, on the PHP query, there's only 2 options, get them by EMPTY or FULL.... if you call the query FULL, only will be show the servers who have people on it, else if you query the EMPTY, only the servers where nobody are playing....example:
[code:1]ÿÿÿÿgetservers (protocol) FULL[/code:1]if you leave it with no OPTIONS, it will returns you all servers that we have on master0.excessiveplus.net
ok this its one thing that we need to get servers, and the other thing its to query them personally.
example:
[code:1]ÿÿÿÿgetstatus[/code:1]
this will return the server info, server rules, players on it[code:1][/b]\xp_physics\2\xp_crazyTourney\0\xp_crazyCTF\0\g_blueteam\Rookies\g_redteam\Noobs
\roundlimit\15\capturelimit\8
\g_maxTeamClients\0\g_maxGameClients\0\xp_unlagged\1\xp_matchmode\0
\sv_allowDownload\1\sv_pure\0\sv_maxclients\56
\timelimit\20\fraglimit\20\dmflags\0\sv_hostname\Excessive Plus! beta1\sv_punkbuster\0
\sv_maxRate\25000\sv_minPing\0
\sv_maxPing\0\sv_floodProtect\0\version\Q3 1.32 freebsd-i386 Oct 7 2002\g_gametype\8\protocol\68
\mapname\1++\sv_privateClients\8
\bot_minplayers\0\.Admin\edy, easy\.Email\info@excessiveplus.net\xp_config\plus-like.cfg
\gamename\excessiveplus\g_needpass\0
\xp_version\xp 1.04-beta1-sql (Oct 28 2007)\Uptime\7:30:50\Players_Red\1 \Score_Time\15:12 (Waiting for Players)
\Score_Blue\0
\Score_Red\0\.Rotation\q3dm11 q3dm7 6++ q3dm1 q3dm6 q3cp1 1++ overkill q3dm0
0 50 "adi_window:(" 0 31 "^7-^0menjek^7-" 0 52 "m"[/code:1]its all we know!! so people who want to make their own spider, try it, i tried and i prefer to use the excessiveplus "database", like X are using or some of clan who have a spider on their clanpage........
sorry about my english,
hope to help people who still dont know much about it...
[/code]
I have tried to follow those steps but i can't sort it out how it works, and what to do.Two examples of a E+ Spider you allready know:
There is an easier way, its in the documentation here: Server-Spider Api
I tried it and it works pretty well for me
The most important file is spider-class.php . And check the example php files to see how you can use this class to get all the information in your webpage. There is nothing said, but you also need to create a empty file called "spider.db" and add chmod 0777 to it (for write permissions). This is a cache file that will save the servers query for 60 sec (see $cache_timeout)
Some other notes:
- It shows there is 1 player even if there isn't any on the server. Solution: count the players with the count() php function instead..
- It doesn't have an implementation for names conversion to html/image (names will appear like they were written in q3, ex. : ^7eps^2!^7lon). Solution: you have to implement it (maybe using regexp + css) or you can use the open source Fancy Fonts Api made by camel here: http://aim-plus.net/article.php?id=23
I've used it for the sneaky-bot on irc :
___________
epsislow
ah hm i think i forgot to tell something :
after you added spider.db and gave 777 permissions, you need to change the cache_timeout to 0 (in spider.class.php) for the cache file to be updated first time:
14 private $cache_file = 'spider.db'; 15 private $cache_timeout = 0;
after this just refresh the example_list.php and you should see the server list there. Then just change it back to 60 sec. If you don't add this, excessiveplus will ban your ip for doing too many requests.
14 private $cache_file = 'spider.db'; 15 private $cache_timeout = 60;
by doing this the spider class will update the cache only if it wasn't updated in the past 60 seconds.
____________
epsislow
hm then it might be because of the "allow_url_fopen" in the php.ini of your server.
84 if ( $fp = fopen($this->url, 'r') ) {
spider.class.php uses fopen to get the content of the servers list from excessiveplus into the cache file. That means that it needs to have allow_url_fopen in the php.ini to open urls. (check to see if you have it )
Note: This setting can only be set in php.ini due to security reasons.
Another way would be to modify the spider class file and implement curl instead of fopen. But that would also mean that you need to have the curl extension added to the php.ini like this:
uncomment or add this line into your php.ini file
extension=php_curl.dll
This is how mine looks like : http://adysite.comli.com/example_list.php
P.S. file_get_contents wont work because its based on fopen and needs allow_url_fopen flag too.
_________
epsislow
If your host does not allow changing allow_url_fopen
, you can include('http_wrapper.php');
.
Note, this is not my wrapper, I have modified it slightly. The changes are between //xp start
and //xp end
.
I will update the spider class someday to be independent of allow_url_fopen
.
Chances are low to modify php.ini settings on a webspace, without root/vserver access. Adjust the example_list.php and use the wrapper.
... // init ini_set('display_errors', 1); include('http_wrapper.php'); include('spider.class.php'); $spider = new spider(); ...
You can remove/comment the display_errors once it works, this is just for debug reasons.
Thanks for you help. I have looked into the files, and uploaded, but the servers won't show like a list like in the examples in my first post and this example: http://c4-excessiveplus.net/?s=spideri really don't know what i am doing wrong.
http://www.sexyfraggers.net/spiderservers/example_query.php
http://www.sexyfraggers.net/spiderservers/example_list.php
www.sexyfraggers.net