<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>THE MOLITOR FORUMS &#187; Topic: header images array vs php random function header image</title>
		<link>http://www.themolitor.com/forums/topic/header-images-array-vs-php-random-function-header-image</link>
		<description>THE MOLITOR FORUMS &#187; Topic: header images array vs php random function header image</description>
		<language>en-US</language>
		<pubDate>Tue, 28 Apr 2026 18:18:06 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.themolitor.com/forums/search.php</link>
		</textInput>
		<atom:link href="http://www.themolitor.com/forums/rss/topic/header-images-array-vs-php-random-function-header-image" rel="self" type="application/rss+xml" />

		<item>
			<title>THE MOLITOR on "header images array vs php random function header image"</title>
			<link>http://www.themolitor.com/forums/topic/header-images-array-vs-php-random-function-header-image#post-41789</link>
			<pubDate>Tue, 11 Jul 2017 14:29:59 +0000</pubDate>
			<dc:creator>THE MOLITOR</dc:creator>
			<guid isPermaLink="false">41789@http://www.themolitor.com/forums/</guid>
			<description><p>Hi there,</p>
<p>For custom services like this, please submit a request here: <a href="http://www.themolitor.com/custom" rel="nofollow">http://www.themolitor.com/custom</a></p>
<p>Best,</p>
<p>Christopher
</p></description>
		</item>
		<item>
			<title>tapdevice on "header images array vs php random function header image"</title>
			<link>http://www.themolitor.com/forums/topic/header-images-array-vs-php-random-function-header-image#post-41785</link>
			<pubDate>Fri, 07 Jul 2017 23:58:16 +0000</pubDate>
			<dc:creator>tapdevice</dc:creator>
			<guid isPermaLink="false">41785@http://www.themolitor.com/forums/</guid>
			<description><p>Hi The Moliitor,<br />
i love you VYSUAL theme html as well as wordpress<br />
I am using html theme for now </p>
<p>my only question is how can i change it from array/ set of images pre defined to php random function<br />
reason being i have more than 50 header images causing array to load website very very slow<br />
i want one random image to load every time user refresh the website</p>
<p>Please i need this very urgently please help and if this is customization i am ready to accept it </p>
<p>&#60;?php<br />
$folder = opendir(images);</p>
<p>$i = 0;<br />
while(false !=($file = readdir($folder))){<br />
if($file != "." &#38;&#38; $file != ".."){<br />
    $images[$i]= $file;<br />
    $i++;<br />
    }<br />
}<br />
$random_img=rand(0,count($images)-1);<br />
echo '&#60;img src="images/'.$images[$random_img].'" alt="" class="myImage" ';</p>
<p>			?&#62;</p>
<p>&#60;!--IMAGE SLIDESHOW--&#62;<br />
	&#60;div id="headerImages"&#62;</p>
<p>		&#60;div class="header-image activeBg" style="background-image:url(images/dock.jpg);"&#62;&#60;img src="images/slideshow/dock.jpg" alt=""&#62;&#60;/div&#62;<br />
		&#60;div class="header-image" style="background-image:url(images/sunshine.jpg);"&#62;&#60;img src="images/slideshow/sunshine.jpg" alt=""&#62;&#60;/div&#62;<br />
		&#60;div class="header-image" style="background-image:url(images/hooded.jpg);"&#62;&#60;img src="images/slideshow/hooded.jpg" alt=""&#62;&#60;/div&#62;<br />
		&#60;div class="header-image" style="background-image:url(images/road.jpg);"&#62;&#60;img src="images/slideshow/road.jpg" alt=""&#62;&#60;/div&#62;<br />
		&#60;div class="header-image" style="background-image:url(images/woods.jpg);"&#62;&#60;img src="images/slideshow/woods.jpg" alt=""&#62;&#60;/div&#62;<br />
		&#60;div class="header-image" style="background-image:url(images/foggy.jpg);"&#62;&#60;img src="images/slideshow/foggy.jpg" alt=""&#62;&#60;/div&#62;<br />
	&#60;/div&#62;&#60;!--end headerImages--&#62;
</p></description>
		</item>

	</channel>
</rss>
