Real-time Clock
Where should I start to write a Real-time Clock? I want it be dynamic, not static. I know how to get the time and display it but how do I keep changing it ?
View Complete Forum Thread with Replies
Related Forum Messages:
Grab Time From World Clock
I need to grab times for few cities from world clock site. Not sure how I can do that. So lets say I want to grab New York time from that site. Not the weekday name. just New yorks time. and show it on my site. How would I do that.
View Replies !
Time Different Between My Apache Server And My Local Clock
I actually have two questions: 1. I try to get current time, but the time I got is 1 hour different from my local time. I assume it is caused by Time Zone. So is there any easy way to fix this? I assume that I can first get the Time Zone of the server by using the T option in date, and then using my local Time Zone to calculate the difference. But I am wondering if there is some buil-in function to do it. 2. I found out this also today while workng on the same project. My apache clock is 10 mins slower than my local clock. Any suggection to calibrate the apache server clock (I don't own the server)?
View Replies !
Countdown Clock That Counts Down To A Specific Time
how can I make a countdown clock that counts down to a specific time and isn't affected by the time that the user has their computer set to? I would like the countdown to look like: ___ days ___ hrs ___ min ___ sec until (event)!! I want it to countdown to March 18, 2005 at 5:30 AM U.S. Central Standard Time (GMT -6). No matter what the user has their computer's time set to, I always want the countdown to be for March 18 at 5:30 AM central time.
View Replies !
Real-time Output?
I'm a relative PHP newbie, so I apologize if this is a simple question. Anyway, here's my problem. I'm using a PHP script to pre-render a bunchload of insert files for an HTML page. Right now there's about 1,600, but that number could get much, much higher when the site goes live. I'll only need to re-render the whole batch once or twice a year (if that) but it's still something I'd like to be able to do in case I have to move the site to a different server, or there's a hard drive crash or etc. Basically what the script does is grab a whole bunch of information from a database and write the insert file. It does this for every single one. The problem of course, is that PHP by default does all this server-side, and then sends it to the browser. Because this process takes like ten or twenty minutes to do, the browser times out long before it's finished. Is there a way to get progressive output with PHP? Or do I need to re-do this in another language like Perl?
View Replies !
Real Time Chat
There's anyone out there that can give me a light on real time chat using sockets. I've seen some using push technics but they all hang up after an elapsed amount of time.
View Replies !
Real-time Chat
I wrote a PHP chat system similar to gChat which simply uses constant ajax calls to update the chat. This system is fine for a few users, but with potentially thousands of users, it is much too hard on the server. I've been considering taking the 'Comet' route, but have heard that PHP can't handle Comet very well. What would be the best language/API to perform real-time chat for a large user-base?
View Replies !
Real Time Sql Query
I am making a web-based chat but to get the msg from the database i need to refresh the page and that will make load and extra bandwidth on the server so i want to make the query in real time ( only the new msg to be received without refresh the whole page ), Any one in here knows how to get data from sql database without having to refresh page.
View Replies !
Real Time Echo'ing Of Var In A Loop
i have a big loop, and rather then waiting until its done for me too see what happened, every time it runs, how can i get the browser to echo the result, and proceed to keep running the loop. basically this loop takes a long time to finish, and i had to set my max runtime past 30 seconds. i guess incorporating a refresh of some sort like this would eliminate the need for the time extension too?
View Replies !
Real Time Form Update
i have a script that i wrote for my clan/guild/linkshell in this online game i play that keeps track of members, the points they receive from events, items etc. in the admin panel of the script where you can update peoples points i want to know if i can add a button or something similar that if you push it updates the points which is currently in another text box in the same form in real time. I'm sorry if i'm not being clear, what i'm trying to do it make it quicker to update a members points because usually after each event they receive either 10 or 20 so i want to add a button where if you push it then it will put 10 or 20 in the 'add' box in real time. right now when you edit a member it shows their current points in a text box and under that two text boxes, one if you want to add points and another if you want to subtract points. if this isnt possible then i assume that i'd have to make it update the points in the box and keep all the values from before and just reload the page with the new value inside the box. wow, i'm sorry if i'm not very clear, please ask questions if you dont understand what i'm trying to say.
View Replies !
Real-time Action Ala Games??
What would be a proper solution for automated decision making in a PHP script, like a game? That is, without an external application, or any human input. For example, any random event that happens when the player is away from the game. How would one go about implementing that?
View Replies !
Real Time Listbox Update
I have one listbox that I populate with while($row = mysql_fetch_array($result, MYSQL_ASSOC) I need to in real time populate another listbox from a related table based on what they have currently selected in the first listbox. Is this possible with php and if so.
View Replies !
Read Data From MS Access Into MySQL In Real-time
I am currently working on a project that involves reading information from a inventory system into Access via ODBC and display the info on the web site using MySQL. I would like to create a live link between the MS Access(local) and MySQL (remote) whenever the inventory system is updated MySQL will be updated as well. I know that MyODBC will let me do the opposite of what I would like to accomplish by reading data in MySQL into Access. Is it possible to do the reverse way.
View Replies !
How Can One Get Real Time Stock Quotes For An Online-community?
For one of our web-communities we plan an offer of real time stock quotes incl. advanced notification services. I have the following questions: - Do you know of any services, that already offers such services in a decent way? And more important: - Does anybody know a provider of such services, that offers a real-time stock quote data stream for such a usage at a decent price? I only know of Deutsche Börse offering it for 1駨 Euro per month. That is too expensive for us.
View Replies !
A Real Challenge For Real PHP Programmers
<?php /* A challenge to every PHP programmer.The one who's gonna solve this problem would be deemed as PSP(PHP Supreme Programmer).The problem is this : You have to write a script that displays a list of categories and subcategorieslike this one: <select name="category"> <option value="1">Main</option> <option value="2">Main > Computers</option> <option value="4">Main > Computers > Hardware </option> <option value="8">Main > Computers > Hardware > PC</option> <option value="7">Main > Computers > Hardware > Mac</option> <option value="9">Main > Computers > Hardware > Atari</option> <option value="11">Main > Computers > Hardware > PC > History of Pc</option> <option value="">etc...</option> </select> The categories and subcategories details are stored in these two tables in a MySQL database. -categories : the categories names and ids. -cat_relations : the relations between categories.It shows which subcategory belongs to which category. The belongings between categories can go very deep and the number of categories is unlimited. This script will create the two tables and fill them with sample data. All you need to do is to change the four variables below. You can send the script back to this email : yasbergy@yahoo.com. */ //Here starts the script. Please change the values of these variables to fit your settings $user = "prospective_PSP"; $database = "db"; $server = "localhost" ; $pwd = "" ; //Connection to the database that you created mysql_connect($server,$user,$pwd) ; mysql_select_db($database); //Creation of the two tables : categories and cat_relations $categories = " CREATE TABLE `categories` (`id` INT not null AUTO_INCREMENT, `name` VARCHAR(100) not null , PRIMARY KEY (`id`), INDEX (`id`), UNIQUE (`id`)) comment = 'The categories details' "; mysql_query($categories) ; $cat_relations = "CREATE TABLE `cat_relations` (`id` INT not null AUTO_INCREMENT, `daughter_id` INT not null, `mother_id` INT not null , PRIMARY KEY (`id`), INDEX (`id`), UNIQUE (`id`)) comment = 'Which category is the daughter of which category'"; mysql_query($cat_relations) ; //Filling the two tables with sample data $cats = array('Main','Computers','Countries','Hardware','S oftware','Programming languages','Mac','PC','Atari','Winamp','History of the PC','IBM','Components','High level','USA','NYC','LA','Manhattan','India','Winzi p'); for ($i=0;$i<count($cats);$i++){ $sql = mysql_query("insert into categories (name) values('".$cats[$i]."')"); } mysql_query("insert into cat_relations (daughter_id,mother_id) values (2,1),(3,1),(4,2),(5,2),(6,2),(7,4),(8,4),(9,4),(1 1,8),(12,8),(13,8),(10,5),(20,5),(14,6),(15,3),(16 ,15),(17,15),(18,16),(19,3)"); //Now you can have a look on them through phpMyAdmin ?>
View Replies !
Db Update And Real Time Update
i wanted to put together my first pages using prototype but i'm kinda stuck. situation: i got a list of pages in the backoffice. in the list you got pagenames, id's, editors and if they're active or not. the active part part is represented by an in/active image. now instead of having to edit the page and change a checkbox to toggle the active status of the page, i was planning to make it able to click on the image in the list itself to toggle the status of the page. thus updating the db when you clicked and refresh the list using ajax. Code:
View Replies !
Clock
have you got a clock what is scripted in php and changes when time changes, just time not date.
View Replies !
Alarm Clock In PHP
Has anyone seen an example of Alarm Clock system done in php. The system would start playing a mp3 or wav at a specified time.
View Replies !
Ticking Clock
I have a bank script that gets the time from a databse however putting it into the database i use time()+24*60*60 which is one day. However this means that in the database is all those number what i would like to do is turn it from those numbers into a time and then have it "tick" down... OR Maybe just be able to skip the bit with turning it into a date and just make it so i can "tick" down 23:59:59 23:59:58 23:59:57 23:59:56 23:59:55 23:59:54 etc.
View Replies !
Dynamic Clock
I have a JavaScript-based dynamic HTML clock that updates every second in real-time (located on my server at http://hal-9001.servehttp.com/clock4.html) that I want to do in PHP, except that I have no idea how to Code it.
View Replies !
Clock Determines Access
I'm building a site where you can only enter from midnight to 1a.m. Could someone point me to a script I may be able to alter that checks the server's time to allow entrance in this range? I already have the clock.
View Replies !
Code Needed For Clock Countdown Script
OK, im trying to get working a countdown clock for a kind of game im doing. Basically I need the clock to have only minutes and seconds, and it counts down from say 10 minutes from whenever the user enters the site. I understand this may need to be java script as I want people to actually see the minutes and seconds tick away. When the time is up, I need the page to be re-directed to a new page which will state that their time is up- game over etc As this game spans over 48 web pages, the clock obviously needs to carry forward its time (minutes remaining) over to each page. Ideally I would like the 'clock/timer' to float at the top of each screen (perhaps with CSS?).
View Replies !
Auto Delete The Old Records But What If Server Clock Was Set Up Wrong In Maintenance?
I want auto delete any events that the event date is at least 1 day older than current date. No problem for the php programming. get the current data (server clock), check the events date and delete the old records. My problem is that for some very rare cases. Say if for extrem cases I have 1000 new events saved in database. But somehow, I or the the hosting company do the server maintenance, and reset the time clock of the server, in case in the maintenace, the server time clock was set up wrong say 2005, was set up as 2006. Code:
View Replies !
Getting The REAL Directory?
Is there any way to get the directory/path of the file running the script, not the directory you're inside (Via dir())? I'm allowing the user to navigate through directories, and that part works great - but whenever I attempt to used getcwd(), it returns the directory the user is in - not the directory of the php file - is there any way to get the directory of the .php file the user is using?
View Replies !
Real Estate MLS/IDX
I am trying to program an MLS/IDX search feature to be integrated into a real estate website. This progrom will allow MLS/IDX searching/browsing (searching by MLS #, house variables, etc) and browsing by property location, etc. I have come accross RETS and have tried to go about it, but wow, maybe MLS/IDX is just some mythical database that doesn't exist? If anyone can help me out here. show some code, point me to a resource, tutorial, something that would be some assistance, I would bow down to them, and mail them one, yes, one ice cold root beer.
View Replies !
Resolve Real IP
I can get the apparent IP from $_SERVER['REMOTE_ADDR']; . However, how can I find the real IP if the user is behind a proxy? I know it must be possible as some "whatismyip" sites do it.
View Replies !
Mysql Real
I found this which I think calls for an indepth brain storming. A very good reading [edited by: eelixduppy at 1:06 pm (utc) on Sep. 12, 2007] [edit reason] fixed typo as per request [/edit]
View Replies !
Real Length Of Arrays
Sometimes, I want to know how many elements are really in an array (php3). The count() and sizeof() functions apparently return the number of non-empty array elements, and if you do a while loop checking for empty will stop on the first empty element. I have been using the following function: function truecount($theArray) { if (is_array($theArray)) { end($theArray); return key($theArray); } } but if the key is non-numeric, won't that trip me up? Anyone have a better solution?
View Replies !
Md5 / Sha1 - Any Real Difference?
I use md5 hash with some of my cookies and occassionally a hidden form field - I know the physical data on my network is insecure (unless being served via https) but I was wondering if there are any advantages to using md5 over sha1 or versa vicea... I know md5 gives me a unique 32bit hash while sha1 I've read is 'secure' (?) and gives a 40bit hash... Since The technical webpage on sha1 is lengthy and for the most part over my head... and other than today, I've never heard of it before... I was wondering if anyone could offer any comments on it...
View Replies !
Htmlspecialchars/real Escape
I'm creating a BBCode parser, and everything's working but one thing; I need code tags, but I will need to real_escape/htmlspecialchars the post to make sure it isn't malicious. The only problem is if I real_escape with code tags that contain php, the php will be removed. If I specialchars the post with php, I can't have syntax highlighting (or, not easily). How do I get round this?
View Replies !
Real IP Address From Behind Proxy Or NAT
How to get the real IP address of a user, not that of their proxy server or the external NAT address. I was quite sure that this wasn't possible without some kind of process getting the address on the client machine. I have suggested that these sites could be using Java to get the real IP address, however, I could be wrong and for me the script that I found always returns 127.0.0.1 . This suggests to me that any script attempting to obtain the hosts real IP address infarct rely s on the HTTP-X-FORWARDED-FOR header sent by the proxy server...
View Replies !
My Real Estate Scripts
I have been writing a real estate agency program and its coming on well but taking longer than I thought. Also I think I am just re-inventing the wheel as I guess like BB scripts there are probably good free ones already writen in php and using mysql ? Can anyone recommend one.? can then continue learning while adapting it to my purposes.
View Replies !
REAL E-mail Validation
if there is a way to actually send an e-mail to the server and see if it bounces or not? What I'm trying to do is require users to enter a valid e-mail address on the front page before entering the site. I don't want to do simple character validation (check for @ and no special chars, etc, etc) but actually see if the e-mail account truly exists before letting them into the site.
View Replies !
Mysql Real Escape
Upon entry into the database, I first clean form input data with html special characters, strip tags, and mysql real escape string. When I retrieve this data from the db, single quotes aren't coming out right on the pages. Some browsers display a question mark, others a blank space, and another (FireFox) totally screws up the text formatting.
View Replies !
Real Escape String
How can i add a escape string to this php mysql query. mysql_query('insert into times (code, date, time, duration) values ("'.$course_code.'","'.$date_inSQL.'","'.$time_inSQL.'","'.$duration.'" )');
View Replies !
Real Audio Download Limiter
i'm running a site with .ra and .ram files, when some visitor download or stream all these files at the same time it causes an huge bandwidth consumption. so i'd like to limit the download per each IP to a certain number of .ra and .ram files at time. i wonder if i can use some php script with cookies session but i'm new to this and i don't know where to start.
View Replies !
PHP Template Redirecting To Real Video
I've developed a RealVideo content management system w/ PHP and MySQL. On the back end is a form that sends a Real Video file (.rm) and writes the filename to a database. On the front end is a PHP template that pulls the filename from the database and outputs a string that is read in by a Flash movie. The Flash movie reads in the file location and places HTML-encoded text inside a text field that says "Launch Video." All works fine -- the Flash movie launches the Real Video file, and the file plays correctly. There's only one problem: the Real Video doesn't stream. In order for a Real Server to stream a Real Video file, a "stub" file with the extension .ram needs to be placed in the root directory. The only content in these .ram files is a URL pointing to the actual .rm file, and it's written in this format: pnm://ra.domainName.com/realvideoFile.rm My problem: The form is sending a Real Video file and the receiving page is copying it to the server as well as inserting a record into my database, but it can't write a .ram file to the root directory because to do so I'd have to adjust permissions accordingly (PHP is part of group Apache). That's unacceptable; I won't adjust permissions on the root directory. My solution was to create a redirector that acts as the stub file: PHP Code:
View Replies !
Is Gmail Homepage Real Ajax?
I saw gmail's storage size on mail.google.com. It was counting size like "Over 2728.845439 megabytes". then increasing... but my dialup connection disconnected I don't understand howto count storage size, when my pc disconnected internet. is it real 2728.845439 MB? or only text?
View Replies !
Stripping Commas From Real Numbers
I have an HTML form in a PHP script which queries the user for a dollar amount of sales. If a user enters "1,000,000" rather than "1000000" for 1 million, PHP (or MySQL?) treats the commas as a decimal and "1" is entered in the database. A simple work-around is to simply advise the user "Please enter numbers only, no commas or $'s" but this seems awkward. Is there a built in function or another easy way to have commas and currency signs stripped out of form-entered data?
View Replies !
Exploding At Real Breaks Not Wraps
I am working on reading my pop3 email , and I am trying to return the header data using the function, I get this fine. The question I have is since there is no consistency to the rows, I want to take each row of data, not a wrap of a long line, any idea beyond checking if it has a : in it???
View Replies !
Creating A Real Estate Site
I am intereted in creating a real estate where I can place house for people to view. I would like to have each room viewable, customer login area, quote for house, 360 degree view of the room, slick looking site. Is there a script that will enable me to do such a thing, or do I need it created from scratch?
View Replies !
Degugger On 5.2.2 (xampp 1.6.2) Real Brainer
I tried to get php dbg debugger working on my machine but it doesn't work at all. Ok, what i did: copied php_dbg-5.2.x.dll (for PHP 5.2.x version) into my xampp/php/ext directory next, modified /xampp/apache/bin/php.ini file appending: Code:
View Replies !
How Convert Http:// Text To Real Hyperlink?
I have some texts in MySQL databases. When I show this texts in webpages using PHP, I need to convert every ocurrence of http://blablabla.com to <a href='http://blablabla.com'>http://blablabla.com</a> , so my text will really became 'active'. The people who wrote the texts don't know HTML tags so I can't ask them to write explicity <a...> </a> commands. The problem is the same with text that contains the @ charactere, as name@mailserver.com . I have to change this to <a href='mailto:name@mailserver.com'>name@mailserver.com</a>. Please, I don't know how to use regular expression. I think It can make this replacemments very easy..
View Replies !
|