Need Help(Yes again) - getting text from remote page then turning into a variable
So theres a page that prints out TRUE or False depending on if a certain texts exists in the database...
(The source)
I was wondering if there was a way to read this page and if it displays True then print the desired text or if it says False then print something else...
I have been trying this:
But it just likes to put "Works" even if I use a known invalid tag
So theres a page that prints out TRUE or False depending on if a certain texts exists in the database...
(The source)
HTML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<api>
<gamertag>True</gamertag>
</api>
I was wondering if there was a way to read this page and if it displays True then print the desired text or if it says False then print something else...
I have been trying this:
PHP:
<?php
include 'gamercard.php';
$file = 'http://www.360voice.com/api/gamertag-leaderboard.asp?tag='.$tag;
$fp = fopen($file, 'r');
$users = $data;
$data = fread($fp, 80000);
$voice = "Works";
//code that will grab the list of names/password and stores it in $users
if ($users = 'True')
{
print $voice;
} else {
print "Unfortuantly this GamerTag is not associated with the http://www.360voice.com website, so we can not display the requested information.";
}
?>