Man, you really need to review your code carefully and learn how to debug.

I immediately saw the error: if $findtok($v1,$network,34)

You're still using $v1 there.