*Edit*
Never mind, I figured out the issue and it works now.
But, I still can't quite get the IV out of a PID. Could someone that knows make a quick guide how you turn PID into IV? I know and I read on smogon.com about it but it was still complicated to me.
I bet you want a taste, well here you go: http://vlacula.no-ip.com/pokemon/pid/?tid=28404&sid=20506&max=20
Basically tid is trainer id, sid is secret id and max is how many results to show. It caps at 5000 because my PHP script can not allocate more space in the memory buffer. It's like a simpler version of the PID calculation program, at least I try to make it like that.