Hello, The following link will give you the number of the Inbound link to some url: http://search.yahooapis.com/SiteExplore ... output=xml In the top you can find "totalResultsAvailable=14370725" how can I get the number into varibale? I tried this: <?PHP $resp = file_get_contents("http://search.yahooapis.com/SiteExplorerService/V1/inlinkData?appid=YahooDemo&query=http://www.cnn.com&omit_inlinks=domain&output=xml"); $xml = simplexml_load_string($resp); echo $xml->ResultSet['totalResultsAvailable']; ?> PHP: But its not working...:/
Its an attribute <?PHP $resp = file_get_contents("http://search.yahooapis.com/SiteExplorerService/V1/inlinkData?appid=YahooDemo&query=http://www.cnn.com&omit_inlinks=domain&output=xml"); $xml = simplexml_load_string($resp); #echo $xml->ResultSet['totalResultsAvailable']; print $xml['totalResultsAvailable']; ?> PHP:
An attribute is something associated with a node (in this case its the parent tree but as an example) <xml> <person type="man"> <heigh>tall</height> <haircolor>brown</haircolor> </person> </xml? in the above 'type="man"' is an attribute of person and these values and handled differently to the child nodes within person.