Bonjour, je cherche a récuperer des informations d'un site. En l'occurence, www.wowarmory.com

Voici la classe que j'utilise pour récuperer les données :

Je préviens tout de suite que je ne connais pas grand chose au XML, c'est surement le pourquoi je ne comprend pas comment faire...

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
 
<?php
class armory {
 
 const BROWSER="Mozilla/5.0 (X11; U; Linux i686; fr-fr; rv:1.8.1.2) Gecko/20070319 Firefox/2.0.0.3";
 
 public $query;
 public $server;
 public $guild;
 public $guildie;
 public $page;
 
public function __construct ( $query, $server, $guild, $guildie, $page ) 
{
	$this->query = $query;
    $this->server = $server;
    $this->guild = $guild;
    $this->guildie = $guildie;
    $this->page = $page;
} // end of __construct()
 
public function pull_xml() 
{
 
    // change the first part of the $url to the armory link that you need
    if( $this->query === 'roster' ){
        $url = 'http://eu.wowarmory.com/guild-info.xml?r=' . urlencode($this->server) . '&n=' . urlencode($this->guild) . '&p=' . $this->page;
 
      }elseif( $this->query === 'character' ){
        $url = 'http://eu.wowarmory.com/character-sheet.xml?locale=fr_fr&r=' . urlencode($this->server) . '&n=' . $this->guildie;
      } 
	  elseif( $this->query === 'achievements' )
	  {
		  $url = 'http://eu.wowarmory.com/character-achievements.xml?r=' . urlencode($this -> server) . '&n=' . $this -> guildie.'&c=168';
	  }
/*
    $ch = curl_init();
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 15);
    curl_setopt ($ch, CURLOPT_USERAGENT,  self::BROWSER);
    
    $url_string = curl_exec($ch); 
	curl_close($ch); 

	return simplexml_load_string($url_string);  
    */
	$opts = array(
    'http'=>array(
        'method'=>"GET",
        'header'=>"User-Agent: ".self::BROWSER." Accept-Language: fr-fr\r\n"
    )
);
$url_string = file_get_contents($url,false,stream_context_create($opts));
return simplexml_load_string($url_string); 
 
 } // end of pull_xml()
 
} // end class  
 
 
$armory = new armory(achievements, Arathi, NULL, Folten, NULL);
$xml = $armory->pull_xml(); 
 
 
var_dump($xml);
 
/*
foreach ($xml->category->achievement as $achiev)
{
	
		echo $achiev['title'].'<br>';
	
}
*/
//echo $xml->characterInfo->character['name'];
?>
donc le var_dump($xml); me permet de récupérer toutes les informations contenue sur la page?

Mais quand je veux les récupérer, je n'en obtiens que 20... Je parle ici de récupérer le "title".

comment faire pour récuperer l'intégralité des résultats???

Pour exemple, la page affichant var_dump($xml); => http://www.mmo-advance.com/armory2.php

et la page affichant les title => http://www.mmo-advance.com/armory.php