I made this function to verify a user’s twitter credentials. Its running on two different webservers.
<?
function twitauth($username, $password){
if(@file_get_contents("http://".$username.":".$password."@twitter.com//account/verify_credentials.xml")){
return "1";}
else {
return "0";}
}
?>
On my webserver, it works fine. On the other one, it ALWAYS returns 1! Even when password is intentionally wrong.
What in the world would cause one server to do one thing, and the other to do something else?
I came up with an alternative solution.