Multi-user advertising beast implementation

zhaozj2021-02-11  211

Multi-user advertising beast implementation

Author: ehome Transfers: www.oso.com.cn in the application site, random advertising is already the most commonly used techniques. The implementation is also more; the following is a randomly extracting multi-advertising user: the Viewer Table is the storage user information, where the pricount is the weight displayed by the user, 0 is deactivated. $ SQL = "SELECT User, Pricount from Viewer"; $ Result = mysql_query ($ SQL); $ I = $ PIC = 0; While ($ CLK = MySQL_FETCH_ARRAY ($ RESULT) {$ USER [$ I] [0] = $ CLK [0]; $ USER [$ I] [1] = $ CLK [1]; $ I ; $ pricount = $ CLK [1];} for ($ j = 0; $ j <3; $ J ) ) {SRAND (Double) microtime () * 1000000); @ $ pri = rand (1, $ price); $ ct = $ i = 0; do {$ ct = $ user [$ I] [1]; $ I ;} while ($ CT <$ PRI); $ Prsunt = $ prist- $ USER [$ I-1] [1]; $ USER [$ I-1] [1] = 0; // $ USER [ $ I-1] [0] Change the randomized advertising user to the J value to generate more users but cannot be greater than the number of database records}

转载请注明原文地址:https://www.9cbs.com/read-5739.html

New Post(0)