I am using php & sql to display an image and information on a home page. I would like for this image and information to rotate every 5 or 6 seconds, using a different record in teh database. Right now, I am calling a record using RAND() LIMIT 1. I assume this will take two steps:
1. changing my query to build an array with the results
2. Using some sort of script to refresh this object on the page after so many seconds and move to the next record in the array.
I am building an advanced image sharing web application. As you may expect, users can upload images and others can comments on it, vote on it, and favorite it. These events will determine the popularity of the image, which I capture in a "karma" field. Now I want to create a Digg-like homepage system, showing the most popular images. It's easy, since I already have the weighted Karma score. I just sort on that descendingly to show the 20 most valued images.
The part that is missing is time. I do not want extremely popular images to always be on the homepage. I guess an easy solution is to restrict the result set to the last 24 hours. However, I'm also thinking that in order to keep the image rotation occur throughout the day, time can be some kind of variable where its offset has an influence on the image's sorting.
Would you recommend the easy scenario (just sort for best images within 24 hours) or the more sophisticated one (use datetime offset as part of the sorting)? Would it be best to run a scheduled service to mark images for the homepage, or would you advise a direct query (I'm using MySQL) As an extra note, the homepage should support paging and on a quiet day should include entries of days before in order to make sure it is always "filled"
I'm quite new to php and now working with the popup box that appears for the first person who login to the system daily, weekly and bi-weekly. So,how to check whether the person is the first person who login to the system and popup a message box for him?
I have an online scheduling system that I'm currently producing, and I'd like to be able to have a simple script run once a week to delete entries from the database as they get old. Basically jobs will "remove themselves" 4 weeks after they have passed, since they won't be relevent anymore. Anyone know how to accomplish this? I'm using PHP and mySQL running on an apache server.
I could always just set-up some page that I can go to to tell the database to clean itself up, but it would be nice to have it done automatically.
I select a different MYSQL record from DB of 15-65 records, to show each week - the DB is updated about every 2 weeks. The record displayed changes each week. :I was doing this finding the first ID number and adding the current week number (1-5) to it, then showing that record, but I now want to be able to delete records.
Maybe I haven't been able to find the answer in Google because I didn't know how it is called exactly but I am still puzzling about an easy solution to update weekly the services of the local church. It should be done without mySql. The ideal situation would be that php could read the appropiate data from a text file, so the text file can be easily edited and uploaded by one of the church's voluntary workers. The text file could look like
Zaterdag 25 oktober. 10:00 Pastor P. Jansen 11:00 Pastor W. Dirksen Zondag 26 oktober. 12:00 Pastor P. Dirks Zaterdag 1 november 10:00 Pastor J.Hendriks Zondag 2 november 9:00 Pastor G. de Vries
I would like a function that reads the whole tekst and only publishes the services for the next weekend. I think I will be able to make a function that converts the date written in Dutch to an English string and than this will be converted to a real date, but how can I make php show not only the date but also the services for that weekend?
If there is info on the web about this,tell me what keywords I should enter in Google.
I am looking at creating a weekly calendar. The calendar will read from Monday - Sunday. Does anyone know of any examples or tutorails on how I can achieve this, as I have tried searching without no results.
I'm working on a form to enter a weekly report. The week begins every sunday. My idea is to select every sunday for the current and next 2 mons, then populate this info in 3 select boxes: [date] [mon] [year]
For example this mon of October has 4 Sundays in it. 7,14, 21,28. so i will have a drop down list including the dates the another with the mon and finally the year.
Here is the code i was able to dig out from this forum. It displays the current month (+2) in the drop down box. The commented code i have added.
Just say I have a chat session on my site at the same time every week (eg - Friday 4pm EST). How can I calculate the time/date of the next meeting. Eg - if the current time is Thursday morning, it'll be the following day. If the current time is Friday afternoon, it needs to calculate the session in 7 days time (eg - that Friday's session has already ended). So is there a way I can calculate the date of the next session based on the current time/date? And how long till the next one? So my output would be "the next meeting is in 3 days, 22 hours and 12 minutes, on Friday 23 May 4pm"
I am trying to learn how to create a database that is updated on a weekly basis from an HTTP datafeed. The link changes weekly (see sample below...notice the date at the end). I think a CRON task would be the best way (am I right?), but I have never written a CRON task.
I maintain a site for an athletic club, and on it I have a form that people can submit that requests a free guest pass. The form contents are sent to an address at the club, and then the club contacts the person to make an appointment. The club would like to start logging the requests and then get weekly updates sent to them via e-mail of all the guest pass requests submitted.
Logging the requests and creating the e-mail with all the requests is easy enough. What I would like to know is if it possible to have the e-mail created and sent automatically on a weekly basis without any interaction from the user. I've looked through the PHP and MySQL manuals and didn't see any type of reference to this.
I have a site with a php login control that writes the login information (username/password/time stamp) to a text file after a successful login. I am trying to figure out how to have that text file emailed to me every week so I can keep track of who has been to the site. The site is on a linux server, so I thought about a cron job but I am not sure how to go about it.
Multiple contact forms on blog that basically send questions to different email accounts, but also have a limit of say 5 emails per week to each account.After the limit of 5 has been sent for that can display a message stating the weekly limit has been reached.an experts Q&A section but the experts only agree to 5 emails every week and don't want any more emails than that.using the Contact Form 7 plugin for Wordpress for the multiple email accounts bit but don't really know how to do the weekly limit.
I was trying to figure out how to send out a weekly mailer of items updated to customers. Let's say sme eople purchase computer books from me, and upon registration, they opted in to receive emails on new computer books that we receive. I want an email sent to them once a week on any new computer books we received in, if there were any new books. If no new books, then they don't need the email. It doesn't matter what day they get sent the email, as long as it's just once a week.
I have a section on my site that I want to show a particular image each week. I currently have a randomize function using shuffle but this seems to change the image every time you change the page. I want it to actually change weekly if possible. Any idea how I can do that? Code:
Is anyone aware of a method to rotate images using PhP GD library? (I mean: Landscape to portret orientation rotating). I am at a loss, and cannot really find anything good? am I missing something here?
I need to have a script that rotates images very simple script that just rotates picture what would be the best way to go about that. i have looked on google and found that either imagemagick or gd2library.
im using php 4.3.8 witch is bundled with gd2 lib running with apach1.3 ..i am using a template with php and i am trying to have a function or some sort of code rotate an image from a button through my template and then submitting my rotated image on my page....any ideas?
I have a photoalbum where one can upload files and then put a title and comment to the image. I also have added the feature to rotate images 90 and -90 degrees.
Each time (why would you rotate it more than once?) you rotate the image, it gets saved with jpeg-compression and it will damage the file. How do I make a non-lossy rotation with either Imagemagick or possibly the GD-library?
i have a simple php script that rotates a php image every time the page is visted or refreshed. on my non-rotating png images I have a behavoir iepngfix.htc applied to them so they work in ie6. I am trying to do the same wiht the images that are rotated by the php script.
having a bit of a problem with my simple php ad script. The thing is i want to rotate the ads randomly.
This is my layout
+++++++++++++++++++++++++++++++++++++++++ Country ¬¶ Ad1 ¬¶Ad2 ¬¶ Ad3 +++++++++++++++++++++++++++++++++++++++++
however i ran into a bit of a problem, when suppose one of the ad space is blank say for example it is ad2 that is blank, how do i implement a loop to see ad1 or ad3 (randolmy), and if one of them is not blank then randomly display the corresponding ad.
how to rotate a background image on our site atlantic surf company
the one with the mountain at the top i would like that to change between a few images every 30 sec or so as i have just been hired here as the web admin im trying to get this sorted for them and dont really know the structure of everything in here
how to make rotating image banner,but i would like to know how to load on remote place like forums and similar.For example,i would like to someone who load site with my signature or whatever each time see different image on different link.Since forums and similar services allow linking on images directly only,is that possible to do?
I have a PHP page, that generates a variable i.e. $var = xyz This page also has code on it that uses a ROTATING script that pulls text files from another directory and displays them at the appropriate places on my page where the code is inserted. What I want is for my $var to be available to the TEXT files that are included and rotated with my rotating script. $Var is used in the text files as a word in a paragraph, right now I get nothing so I know my echo "$var"; is working in my text file but the variable is empty.