<?xml version="1.0" encoding="UTF-8"?><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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CSS Random Background Image Rotation</title>
	<atom:link href="http://www.thought-after.com/2006/05/css-random-background-image-rotation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thought-after.com/2006/05/css-random-background-image-rotation/</link>
	<description>Geeky stuff by Lafinboy</description>
	<lastBuildDate>Wed, 18 Jan 2012 23:07:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Dionne</title>
		<link>http://www.thought-after.com/2006/05/css-random-background-image-rotation/#comment-8735</link>
		<dc:creator>Dionne</dc:creator>
		<pubDate>Wed, 18 Jan 2012 23:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-8735</guid>
		<description>Hi There Scott,

Me again... are you still checking this site frequently?

If not, does anyone else know how to do what I&#039;m asking?

Thanks,

Dionne</description>
		<content:encoded><![CDATA[<p>Hi There Scott,</p>
<p>Me again&#8230; are you still checking this site frequently?</p>
<p>If not, does anyone else know how to do what I&#039;m asking?</p>
<p>Thanks,</p>
<p>Dionne</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dionne</title>
		<link>http://www.thought-after.com/2006/05/css-random-background-image-rotation/#comment-8734</link>
		<dc:creator>Dionne</dc:creator>
		<pubDate>Mon, 16 Jan 2012 22:25:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-8734</guid>
		<description>Hi Again. Is anyone there? I&#039;d really love to know how to do what I&#039;m asking.

Cheers!

Dionne</description>
		<content:encoded><![CDATA[<p>Hi Again. Is anyone there? I&#039;d really love to know how to do what I&#039;m asking.</p>
<p>Cheers!</p>
<p>Dionne</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dionne</title>
		<link>http://www.thought-after.com/2006/05/css-random-background-image-rotation/#comment-8733</link>
		<dc:creator>Dionne</dc:creator>
		<pubDate>Mon, 16 Jan 2012 02:20:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-8733</guid>
		<description>Hi There,

I&#039;ve implemented your script in a Wordpress theme that I&#039;m building locally. 

Instead of using it to change the background for the header, I&#039;ve used it to change the background image I&#039;m using for the dates of my blog posts. 

It works like exactly like it&#039;s supposed to, but now I&#039;m wondering if there&#039;s any way to get it to pick a different image for every post? So, in addition to changing on each page refresh, each post would have a different background image behind the date?

Thoughts?

Thanks a bunch for the code and your help!

Dionne</description>
		<content:encoded><![CDATA[<p>Hi There,</p>
<p>I&#039;ve implemented your script in a WordPress theme that I&#039;m building locally. </p>
<p>Instead of using it to change the background for the header, I&#039;ve used it to change the background image I&#039;m using for the dates of my blog posts. </p>
<p>It works like exactly like it&#039;s supposed to, but now I&#039;m wondering if there&#039;s any way to get it to pick a different image for every post? So, in addition to changing on each page refresh, each post would have a different background image behind the date?</p>
<p>Thoughts?</p>
<p>Thanks a bunch for the code and your help!</p>
<p>Dionne</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradeep</title>
		<link>http://www.thought-after.com/2006/05/css-random-background-image-rotation/#comment-8726</link>
		<dc:creator>Pradeep</dc:creator>
		<pubDate>Thu, 29 Dec 2011 18:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-8726</guid>
		<description>Hi,

Thanks for ur help. However, I talked to my hosting company and they have also set the permission but I&#039;m still not able to get rid of the warning. They said there may be some problem with your coding, please check that.

Now I&#039;m stuck in the middle. Pls help if it&#039;s possible for you.

Any help will be greatly appreciated.

Thanks again...</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Thanks for ur help. However, I talked to my hosting company and they have also set the permission but I&#039;m still not able to get rid of the warning. They said there may be some problem with your coding, please check that.</p>
<p>Now I&#039;m stuck in the middle. Pls help if it&#039;s possible for you.</p>
<p>Any help will be greatly appreciated.</p>
<p>Thanks again&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lafinboy</title>
		<link>http://www.thought-after.com/2006/05/css-random-background-image-rotation/#comment-8724</link>
		<dc:creator>Lafinboy</dc:creator>
		<pubDate>Wed, 28 Dec 2011 09:48:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-8724</guid>
		<description>Hi, thanks for the detailed report. Everything looks to be set up correctly as far as paths go. The problem is likely to be a permissions issue on the production server. As it&#039;s a Windows server I can&#039;t offer much direct assistance. This post on PHP.net may offer some guidance http://www.php.net/manual/en/function.opendir.php#79685</description>
		<content:encoded><![CDATA[<p>Hi, thanks for the detailed report. Everything looks to be set up correctly as far as paths go. The problem is likely to be a permissions issue on the production server. As it&#039;s a Windows server I can&#039;t offer much direct assistance. This post on PHP.net may offer some guidance <a href="http://www.php.net/manual/en/function.opendir.php#79685" rel="nofollow">http://www.php.net/manual/en/function.opendir.php#79685</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradeep</title>
		<link>http://www.thought-after.com/2006/05/css-random-background-image-rotation/#comment-8723</link>
		<dc:creator>Pradeep</dc:creator>
		<pubDate>Wed, 28 Dec 2011 05:50:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-8723</guid>
		<description>Thank you so much for your quick response. I really appreciate it.

After adding this line
die($path);

when I navigate to the url below:
http://woodlightproductions.com/login/dynamic_css.php

it gives me this result:
/login/images/random-images/

Here is the link I am trying to set the background image
http://woodlightproductions.com/login/login.php

And the images are exactly in the below destination folder of my production server.

httpdocs/login/images/random-images

And the dynamic_css.php, styles.css and login.php all these files are in login folder.

Please suggest.</description>
		<content:encoded><![CDATA[<p>Thank you so much for your quick response. I really appreciate it.</p>
<p>After adding this line<br />
die($path);</p>
<p>when I navigate to the url below:<br />
<a href="http://woodlightproductions.com/login/dynamic_css.php" rel="nofollow">http://woodlightproductions.com/login/dynamic_css.php</a></p>
<p>it gives me this result:<br />
/login/images/random-images/</p>
<p>Here is the link I am trying to set the background image<br />
<a href="http://woodlightproductions.com/login/login.php" rel="nofollow">http://woodlightproductions.com/login/login.php</a></p>
<p>And the images are exactly in the below destination folder of my production server.</p>
<p>httpdocs/login/images/random-images</p>
<p>And the dynamic_css.php, styles.css and login.php all these files are in login folder.</p>
<p>Please suggest.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lafinboy</title>
		<link>http://www.thought-after.com/2006/05/css-random-background-image-rotation/#comment-8722</link>
		<dc:creator>Lafinboy</dc:creator>
		<pubDate>Wed, 28 Dec 2011 03:26:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-8722</guid>
		<description>Hi Pradeep, it looks very much like you are experiencing path issues on the production server. First step is to verify that the path you are setting in the dynamic_css.php file is being converted to a correct path. 

You can test this by echoing out the $path variable in the dynamic_css.php file by adding:
&lt;code&gt;die($path);&lt;/code&gt;
directly after the line that reads:
&lt;code&gt;$path = $_SERVER[&#039;DOCUMENT_ROOT&#039;] . $imgFolder;&lt;/code&gt;

If the path is not correct adjust it until it is. If you still experience issues send me the actual URL so that I can debug from my end.</description>
		<content:encoded><![CDATA[<p>Hi Pradeep, it looks very much like you are experiencing path issues on the production server. First step is to verify that the path you are setting in the dynamic_css.php file is being converted to a correct path. </p>
<p>You can test this by echoing out the $path variable in the dynamic_css.php file by adding:</p>
<div class="codesnip-container" >die($path);</div>
<p>directly after the line that reads:</p>
<div class="codesnip-container" >$path = $_SERVER['DOCUMENT_ROOT'] . $imgFolder;</div>
<p>If the path is not correct adjust it until it is. If you still experience issues send me the actual URL so that I can debug from my end.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradeep</title>
		<link>http://www.thought-after.com/2006/05/css-random-background-image-rotation/#comment-8721</link>
		<dc:creator>Pradeep</dc:creator>
		<pubDate>Wed, 28 Dec 2011 02:07:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-8721</guid>
		<description>Just adding few more warnings..I get from the above code

when I navigate to dynamic_css.php in the url I get the below warning messages:
http://domainname.com/login/dynamic_css.php


Warning: opendir(/login/images/random-images/) [function.opendir]: failed to open dir: No error in C:\inetpub\vhosts\domainname.com\httpdocs\login\dynamic_css.php on line 47

Warning: readdir(): supplied argument is not a valid Directory resource in C:\inetpub\vhosts\domainname.com\httpdocs\login\dynamic_css.php on line 50

Warning: closedir(): supplied argument is not a valid Directory resource in C:\inetpub\vhosts\domainname.com\httpdocs\login\dynamic_css.php on line 59

But when I navigate to the same dynamic_css.php file on my localhost it&#039;s working fine and giving me the below result.

#body { background-image: url(&#039;/login/images/random-images/bg_img5.jpg&#039;); }

Expecting an early response.
Thanks</description>
		<content:encoded><![CDATA[<p>Just adding few more warnings..I get from the above code</p>
<p>when I navigate to dynamic_css.php in the url I get the below warning messages:<br />
<a href="http://domainname.com/login/dynamic_css.php" rel="nofollow">http://domainname.com/login/dynamic_css.php</a></p>
<p>Warning: opendir(/login/images/random-images/) [function.opendir]: failed to open dir: No error in C:\inetpub\vhosts\domainname.com\httpdocs\login\dynamic_css.php on line 47</p>
<p>Warning: readdir(): supplied argument is not a valid Directory resource in C:\inetpub\vhosts\domainname.com\httpdocs\login\dynamic_css.php on line 50</p>
<p>Warning: closedir(): supplied argument is not a valid Directory resource in C:\inetpub\vhosts\domainname.com\httpdocs\login\dynamic_css.php on line 59</p>
<p>But when I navigate to the same dynamic_css.php file on my localhost it&#039;s working fine and giving me the below result.</p>
<p>#body { background-image: url(&#039;/login/images/random-images/bg_img5.jpg&#039;); }</p>
<p>Expecting an early response.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradeep</title>
		<link>http://www.thought-after.com/2006/05/css-random-background-image-rotation/#comment-8720</link>
		<dc:creator>Pradeep</dc:creator>
		<pubDate>Tue, 27 Dec 2011 21:18:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-8720</guid>
		<description>Style tag is there which doesn&#039;t show here in the blog.

Thanks</description>
		<content:encoded><![CDATA[<p>Style tag is there which doesn&#039;t show here in the blog.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradeep</title>
		<link>http://www.thought-after.com/2006/05/css-random-background-image-rotation/#comment-8719</link>
		<dc:creator>Pradeep</dc:creator>
		<pubDate>Tue, 27 Dec 2011 21:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-8719</guid>
		<description>Hi,

I tried your script. It works fine on my local host (IIS). But when I upload it to the web server it doesn&#039;t load the background images.

Here is the detail
Windows Web Server.
root folder is: httpdocs

Under root folder I have created a folder login.

All my php files are inside login folder.

File I am trying to get it work with the background is login.php
Inside &#039;login.php&#039; file

@import url(&quot;/login/dynamic_css.php&quot;);



// table and rest of the stuff are here..



Inside dynamic_css.php
----------------------------------
$imgFolder = &quot;/login/images/random-images/&quot;; // all my bg images are in random-images folder. file size around 2 MB each
$element = &quot;body&quot;;

Inside styles.css
-----------------------

body {
  // no default background is set..
  }

So as per above structure it works absolutely fine at the below link of my localhost

http://localhost/login/login.php

So all the files are inside login folder and login folder is lying at the root folder wwwroot of my localhost and working fine.

But when I uploaded the same login folder to my web server it&#039;s not working.

I have tried with the following options in dynamic_css.php file

$imgFolder = &quot;http://domainname.com/login/images/random-images/&quot;;  // it also doesn&#039;t work 

$imgFolder = &quot;http://www.domainname.com/login/images/random-images/&quot;;  // it also doesn&#039;t work 

$imgFolder = &quot;/login/images/random-images/&quot;;  // it also doesn&#039;t work 

$imgFolder = &quot;../login/images/random-images/&quot;;  // it also doesn&#039;t work 

with the following options in login.php

@import url(&quot;http://www.domainname.com/login/dynamic_css.php&quot;);  //doesn&#039;t work

@import url(&quot;http://domainname.com/login/dynamic_css.php&quot;); // doesn&#039;t work

@import url(&quot;/login/dynamic_css.php&quot;); // doesn&#039;t work



A suggestion will be highly appreciated.

Thanks,</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I tried your script. It works fine on my local host (IIS). But when I upload it to the web server it doesn&#039;t load the background images.</p>
<p>Here is the detail<br />
Windows Web Server.<br />
root folder is: httpdocs</p>
<p>Under root folder I have created a folder login.</p>
<p>All my php files are inside login folder.</p>
<p>File I am trying to get it work with the background is login.php<br />
Inside &#039;login.php&#039; file</p>
<p>@import url(&#034;/login/dynamic_css.php&#034;);</p>
<p>// table and rest of the stuff are here..</p>
<p>Inside dynamic_css.php<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
$imgFolder = &#034;/login/images/random-images/&#034;; // all my bg images are in random-images folder. file size around 2 MB each<br />
$element = &#034;body&#034;;</p>
<p>Inside styles.css<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>body {<br />
  // no default background is set..<br />
  }</p>
<p>So as per above structure it works absolutely fine at the below link of my localhost</p>
<p><a href="http://localhost/login/login.php" rel="nofollow">http://localhost/login/login.php</a></p>
<p>So all the files are inside login folder and login folder is lying at the root folder wwwroot of my localhost and working fine.</p>
<p>But when I uploaded the same login folder to my web server it&#039;s not working.</p>
<p>I have tried with the following options in dynamic_css.php file</p>
<p>$imgFolder = &#034;http://domainname.com/login/images/random-images/&#034;;  // it also doesn&#039;t work </p>
<p>$imgFolder = &#034;http://www.domainname.com/login/images/random-images/&#034;;  // it also doesn&#039;t work </p>
<p>$imgFolder = &#034;/login/images/random-images/&#034;;  // it also doesn&#039;t work </p>
<p>$imgFolder = &#034;../login/images/random-images/&#034;;  // it also doesn&#039;t work </p>
<p>with the following options in login.php</p>
<p>@import url(&#034;http://www.domainname.com/login/dynamic_css.php&#034;);  //doesn&#039;t work</p>
<p>@import url(&#034;http://domainname.com/login/dynamic_css.php&#034;); // doesn&#039;t work</p>
<p>@import url(&#034;/login/dynamic_css.php&#034;); // doesn&#039;t work</p>
<p>A suggestion will be highly appreciated.</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
</channel>
</rss>

