[SOLVED]Why does md5 return different hash code
Posted: Mon Sep 26, 2011 1:05 pm
Hi I am having trouble understanding this behavior. I'm using a cms system called cms made simple (I've tried posting on their forum but get no replies). One of it's addons has a function that creates an url (it's inner workings is unknown to me, but I know it returns an url string). Lets say I call the function and it returns the url: http://someurl.com and store it in $url, now when I call md5($url) it returns invalid hash code but when I echo $url and copy/paste the string into md5: md5("http://someurl.com") it returns the expected hash value.
Now how could this be? At first I suspected encoding problems, but I've tried utf8_encode, utf8_decode, urlencode, urldecode, rawurlencode even htmlentitites, stripslashes, addslashes on $url but I don't get the correct hashcode as from "http://someurl.com"
Any ideas?
Now how could this be? At first I suspected encoding problems, but I've tried utf8_encode, utf8_decode, urlencode, urldecode, rawurlencode even htmlentitites, stripslashes, addslashes on $url but I don't get the correct hashcode as from "http://someurl.com"
Any ideas?