![]() Shoutbox (View Full Shoutbox)
|
||||
Click Refresh to load shouts. |
||||
|
[PHP] get character info
|
|
11-07-2009, 04:50 PM
Post: #1
|
|||
|
|||
|
[PHP] get character info
Hey,
I was wondering how I can get a players info from tibia.com and post it on my website..? I followed some old threads in this board but all I could manage t oget from those was a variable that said "ArrayArray" .. some1 has a code i could copy and learn from or something?thanks in advance, |
|||
|
11-07-2009, 06:04 PM
Post: #2
|
|||
|
|||
RE: [PHP] get character info
(11-07-2009 04:50 PM)Khoda Wrote: Hey, Search for: curl and preg_match_all. Example: PHP Code: <?phpGathering information. |
|||
|
11-08-2009, 10:10 AM
Post: #3
|
|||
|
|||
|
RE: [PHP] get character info
okay thanks
|
|||
|
03-22-2010, 08:37 AM
Post: #4
|
|||
|
|||
|
RE: [PHP] get character info
The basic logic for the beginners through each character in the string and compare it to all possibilities creating a counter for each possible character
<? $string='Count the character frequency of this string'; $count_chars = explode(' ', $string); $a = $x = $z = $other = 0; for($i = 0; $i < sizeof($count_chars); $i++) { switch($count_chars[$i]) { case "a": $a++; break; case "x": $x++; break; case "z": $z++; break; default: $other++; break; } } print "Instances of <br>a = $a<br>x = $x<br>z = $z<br>"; ?> iedge |
|||
|
04-11-2010, 06:55 AM
Post: #5
|
|||
|
|||
|
RE: [PHP] get character info
Well, I used to do it this way:
Code: $site = file_get_contents("http://www.tibia.com/community/?subtopic=whoisonline&world=Aldora");I am basically searching for charcter right in front of nick, level or vocation and the one following it and then substract it from the rest of the content. I dunno if it's the best or most efficient way, but it's the esiest I know. |
|||
|
« Next Oldest | Next Newest »
|

![[-]](images/mint/collapse.gif)


some1 has a code i could copy and learn from or something?
