TestQRcode.php 6.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: stanley-king
  5. * Date: 2017/5/20
  6. * Time: 下午4:09
  7. */
  8. define('BASE_ROOT_PATH',str_replace('/test','',dirname(__FILE__)));
  9. require_once(BASE_ROOT_PATH . '/fooder.php');
  10. require_once(BASE_ROOT_PATH . '/helper/util_helper.php');
  11. class TestQRcode extends PHPUnit_Framework_TestCase
  12. {
  13. public function testPgenA()
  14. {
  15. for ($i = 0; $i < 1000;$i++) {
  16. $save_path = BASE_UPLOAD_PATH . DS.ATTACH_MQRCODE.DS . "{$i}.png";
  17. util::qrcode("http://www.baidu.com","{$i}.png");
  18. }
  19. }
  20. public function testPgenB()
  21. {
  22. for ($i = 1000; $i < 2000;$i++) {
  23. $save_path = BASE_UPLOAD_PATH . DS.ATTACH_MQRCODE.DS . "{$i}.png";
  24. util::qrcode("http://www.baidu.com","{$i}.png");
  25. }
  26. }
  27. public function testPgenC()
  28. {
  29. $bonus_urls = 'http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=37011497008878285022,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=49871497008878288715,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=33191497008878290461,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=82431497008878291960,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=75231497008878293546,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=44051497008878295127,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=53821497008878296732,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=86091497008878298565,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=74421497008878300374,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=14151497008878302183,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=32051497008878303995,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=20181497008878305885,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=21191497008878307698,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=98471497008878309606,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=65191497008878310999,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=74271497008878312456,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=73931497008878314075,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=34831497008878315481,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=89881497008878316845,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=22671497008878318517,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=83171497008878320622,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=64211497008878322835,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=46141497008878324900,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=66361497008878326428,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=70031497008878328081,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=63311497008878329563,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=48021497008878331028,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=57461497008878332611,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=53811497008878334176,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=35381497008878335685,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=60581497008878337530,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=40351497008878339039,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=34101497008878340555,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=45241497008878342056,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=99571497008878343781,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=98201497008878345332,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=11161497008878346835,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=50641497008878348356,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=31871497008878349868,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=10441497008878351341,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=86001497008878353114,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=84661497008878354491,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=66581497008878355813,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=51331497008878357564,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=50671497008878359373,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=24191497008878361338,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=47561497008878363350,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=93111497008878365557,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=35871497008878367456,http://p.lrlz.com/mobile/index.php?act=bonusex&op=open&client_type=wap&type_sn=39991497008878369137';
  30. $urls = explode(',',$bonus_urls);
  31. $i = 0;
  32. foreach ($urls as $url)
  33. {
  34. $save_path = "/Users/stanley-king/Desktop/qrcode/{$i}.png";
  35. util::qrcode_path($url,$save_path);
  36. $i++;
  37. }
  38. }
  39. }