Jump to content


Photo

Php Wizzkid Needed


  • Please log in to reply
8 replies to this topic

#1 geekazoid

geekazoid
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 June 2006 - 09:12 AM

Ok, I got a wild man of a script in request here. I know you guys are good at writing scripts but do any of you think you can muster this one ?

A script to rotate randomly each day a differant image placed in a "certain folder" on my server.

So what would happen is, i put one picture in a .html file and rename it 1. then a put some text in the next .html file and rename it 2, and because i have put both the files (1 and 2) into a folder named, Picfold they would both be randomly seleceted EACH DAY ! so one day it would show text then next day it might show a picture. Yea? I have found lots of random page load scripts but i would like one that randomly changed each day ?

Can any one ya wizzards help me out. ? Thanx In advance. And please Explain it as if im thick ( Its not too far from the truth [img src=\"style_emoticons/[#EMO_DIR#]/laugh.gif\" style=\"vertical-align:middle\" emoid=\":laugh:\" border=\"0\" alt=\"laugh.gif\" /] [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /] )

#2 wisewood

wisewood
  • Members
  • PipPipPip
  • Advanced Member
  • 226 posts
  • LocationRotherham, England

Posted 28 June 2006 - 10:51 AM

Create a mysql (or other) database with a simple table in it, something like this

id - Integer (primary key)
day - text
month - text
year - text
file - text

Each time a visitor loads your page, have it query the database table to see if there is an entry for todays day month and year. if there is, display the file specified in the database, otherwise select one at random, and insert the name of it into the database to be found by the next user.


wisewood: proven fact, I am both wise, and wooden.

#3 geekazoid

geekazoid
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 June 2006 - 11:28 AM

Huh !

#4 DaveLinger

DaveLinger
  • Members
  • PipPipPip
  • Advanced Member
  • 268 posts
  • LocationWV, USA

Posted 28 June 2006 - 11:48 AM

Something tells me Geekazoid is looking for the freelancing forum.
http://www.DaveLinger.com
dave at linger dot com

#5 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 28 June 2006 - 11:52 AM

[!--quoteo(post=388790:date=Jun 28 2006, 07:48 AM:name=DaveLinger)--][div class=\'quotetop\']QUOTE(DaveLinger @ Jun 28 2006, 07:48 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Something tells me Geekazoid is looking for the freelancing forum.
[/quote]

Sounds that way. Geekazoid, are you looking for someone to write a script for you, or are you simply looking for help with writing one yourself?
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#6 geekazoid

geekazoid
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 28 June 2006 - 03:28 PM

i would like someone to write one for me, Am i in the wrong forum ? Sorry im new to this website

#7 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 28 June 2006 - 03:38 PM

Sorry, but phpfreaks aren't a place where people code for you.
You should try to do it yourself, and if you had any difficulty with your code (example you getting error or can't figure out something) then feel free to ask us.

Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.


#8 DaveLinger

DaveLinger
  • Members
  • PipPipPip
  • Advanced Member
  • 268 posts
  • LocationWV, USA

Posted 28 June 2006 - 04:03 PM

phpfreaks IS a place where people code for you.

Only in this forum: [a href=\"http://www.phpfreaks.com/forums/index.php?showforum=8\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showforum=8[/a]
http://www.DaveLinger.com
dave at linger dot com

#9 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 28 June 2006 - 04:05 PM

:s I didn't notice that section lolz.
But if you keep asking for others to code for you, you wouldn't get the fun of php. :P

Ok, time for me to sleep, cya everyone tomorrow.

Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users