I need to convert this code from PHP to VB6:
I've tried many times, and so has my friend.PHP Code:function stringToHex($uString, $binder, $key) {
$index = 0;
$count = 0;
while ($index < strLen($uString)) {
if ($count >= strlen($binder))
$count = 0;
$current = strpos($key, $uString{$index});
if ($current !== false) {
$current = ($current + strpos($key, $binder{$count})) % strlen($key);
$result .= $key{$current};
} else {
$result .= $uString{$index};
}
$count++;
$index++;
}
if ($randomKey < 10)
$result .= 0;
$result .= $randomKey;
return $result;
}
Please help![]()




Reply With Quote