Jump to content


This topic is now archived and is closed to further replies.


coding problem--need help

Recommended Posts

I have the following code which should generate something like this


instead it does this:


I know that the problem is with how i constructed $track and passed it to $sessid. But how do i fix it

$token=' ';
for ($f=1;$f<=100;$f++) {
$seedID = substr('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789~!@#$%^&*+?.', rand(1,73), 1);
$trackingID .= trim($seedID);
$token = sha1(uniqid(trim($trackingID)));

for ($g=1;$g<=10;$g++) {
$seq .= rand(1,2);
    $toke = "$"."token["."$"."h].";
      $hashen = "$"."hash["."$"."h].";
    $track = eregi_replace("1", "$toke", "$seq");
      $track = eregi_replace("2", "$hashen", "$track");
      $string = strlen($track) - 1;
        $track = substr($track, 0, $string);

$sessid = '';
for($h=0;$h<strlen($token);$h++) {
          $sessid = $track;

echo $sessid;


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.