I
I
iamilya2014-12-23 17:52:18
PHP
iamilya, 2014-12-23 17:52:18

How to translate code from Action Script to php?

Actually, there is a code for AS. Help translate it to php

var i:String = null;
         var request4:URLRequest = null;
         var request:URLRequest = new URLRequest();
         var bs44:Array = [];
         var bs33:String = "bigslowass,";
         request.data = param;
         request.method = URLRequestMethod.POST;
         for(i in request.data)
         {
            bs44.push({
               "field":i,
               "value":request.data[i]
            });
         }
         request4 = new URLRequest();
         bs44.sortOn("field");
         bs44.reverse();
         bs33 = "bigslowass,";
         bs44.reverse();
         j = 0;
         while(j < bs44.length)
         {
            bs33 = bs33 + (bs44[j].field + "=" + bs44[j].value + ",");
            j++;
         }
         bs44.reverse();
         bs44.reverse();
         if((param.t) && (param.t % 2))
         {
            bs33 = bs33 + "324324234234";
         }
         else
         {
            bs33 = bs33 + "12214125415";
         }
         var md5:String = MD5.hash(bs33);
         bs44.reverse();
         bs44.reverse();
         j = 0;
         while(j < 32)
         {
            j++;
         }
         request.data.x = md5;
         return request;

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question