这是我的代码,例如:
我希望系统在每次刷新时随机显示其中一个URL。我希望它能优先显示更高优先级的URL,以此保证收益更高的广告更多地被展示。这是一个横幅系统,高优先级的广告付费更多,因此应该展示得更频繁。
如何实现?
<?php
$arr = array(
array("url" => "http://google.com", "priority" => 2),
array("url" => "http://facebook.com", "priority" => 2),
array("url" => "http://youtube.com", "priority" => 2),
array("url" => "http://stackoverflow.com", "priority" => 1),
array("url" => "http://kickass.to", "priority" => 1),
array("url" => "http://twitter.com", "priority" => 1),
array("url" => "http://example.com", "priority" => 1),
);
?>
我希望系统在每次刷新时随机显示其中一个URL。我希望它能优先显示更高优先级的URL,以此保证收益更高的广告更多地被展示。这是一个横幅系统,高优先级的广告付费更多,因此应该展示得更频繁。
如何实现?