Jump to content

PHP script that controls daily rotation on Windows server also on Linux server


Recommended Posts

I currently have this site where you'll notice that daily image there. It's controlled by a custom PHP script to auto-rotate to a new image, every 24/7/365 at 2AM NYC time....works perfect. That script was uploaded and resides on the actual Windows server of my web host.This site is on a Windows server. The same hosting company reserved Linux space so I can rebuild the site in WordPress (obviously for better SEO, CSS etc.). I was told the same script works in the WP site (here's temp domain URL) and the only problem is, I wanted it to perform the same functionality in the body of the WP page.....looks like that won't happen. Aside from altering or modifying the script, not even touching it, are there other ways the image can be made to appear in the page? Keep in mind, I am not a PHP'er, only an artist....and a web designer. Any info, help, feedback, comments, constructive criticism would be greatly appreciated.

Link to comment
Share on other sites

Not certain on that DavidAM. Reason being, is I did not author the script. However, there were other variants of the code devised, so that interested web designers could also embed a specific line of code in their own HTML in order to show / rotate the cartoon on their own page(s). In essence, all I need to do, is give them this:

 

<a href="http://danscartoons....oons.com/"><img border="2" src="http://danscartoons....lycartoon.php">

 

...and once added, the image would be begin it's journaey, changes of course at 2AM tomorrow morning to another image I uploaded 365 toons in a specific folder of images. I include a total of one year's worth, once per year so it's a "set-it-and-forget-it" type of script. As I say, this is all currently happening on my web host's Windows server. They reserved my hosting space for my future WordPress them on their Linux server and notified me the same script will work there....but like I mentioned, it won't display in "BODY" when it was looked at. So see attached screenshot and I am left wondering about a work-around and if it could be made to appear in other parts of the WordPress page, i.e. SIDEBAR, FOOTER or HEADER?

 

This has me stumped....but I feel offering a different image every day adds more "value" or return visitors and would hate to lose this functionality.

Link to comment
Share on other sites

The same source for my daily image that appears on my index pagenow (which is on a Windows server) will also work on the same web hosting company's Linux server. However, I was told by someone with PHP knowledge that the image won't display in that BODY area of WordPress. So was wondering then, could it be displayed in the HEADER area perhaps? In essence, the script works on both server sides....so curious if WordPress will allow it to display elsewhere? As mentioned, I am not a PHP'er. Here is another way to see the day's current image in your browser. Click here

Edited by dinrock
Link to comment
Share on other sites

This link should work in a Wordpress page as well, it's just plain HTML after all:

<img border="2" src="http://danscartoons.com/cotd/dailycartoon.php" title="CARTOON PICTURES">

 

So without actually seeing the Wordpress page in action, I can't say anything on why it doesn't work.

 

Though, that said, you best bet would be to hire someone who knows what they're doing. Not only with the PHP code, and Wordpress, but also the HTML code. To say it mildly, it's quite obvious that this site was made in Front Page; Both design and code-wise; And that's not a good thing, I'm afraid.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.