maor Posted August 8, 2016 Share Posted August 8, 2016 How do I do LONG POOL?AJAX / PHP - databasethanks Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/ Share on other sites More sharing options...
Jacques1 Posted August 8, 2016 Share Posted August 8, 2016 (edited) What is “LONG POOL”? If you're talking about long polling, google it, analyze the examples and then come back with a proper question. This isn't a forum where you just sit back and let others do the work. Edited August 8, 2016 by Jacques1 Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535802 Share on other sites More sharing options...
NotionCommotion Posted August 9, 2016 Share Posted August 9, 2016 Long pool is typically referred to as an Olympic size pool. Please see: https://en.wikipedia.org/wiki/Olympic-size_swimming_pool. 1 Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535804 Share on other sites More sharing options...
maor Posted August 9, 2016 Author Share Posted August 9, 2016 I have a system that works with txt file I need an explanation il make it work with sql Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535825 Share on other sites More sharing options...
ginerjm Posted August 9, 2016 Share Posted August 9, 2016 (edited) So - you have a txt file. What do you want to do with it? You're not telling us anything at all here. Edited August 9, 2016 by ginerjm Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535826 Share on other sites More sharing options...
Jacques1 Posted August 9, 2016 Share Posted August 9, 2016 I have a system that works with txt file I need an explanation il make it work with sql By using your SQL queries instead of the file operations. Long pollling doesn't care if you're working with text files or an SQL database. The concept is always the same. Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535829 Share on other sites More sharing options...
maor Posted August 9, 2016 Author Share Posted August 9, 2016 Can you help me make this database http://www.filedropper.com/longpoll Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535847 Share on other sites More sharing options...
Jacques1 Posted August 9, 2016 Share Posted August 9, 2016 No, I will not download your .zip files, and, no, I will not write the code for you. Post the relevant code here, ask a coherent question and show your attempts at solving the problem. Then we can help you. Otherwise I'm not interested. Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535850 Share on other sites More sharing options...
maor Posted August 9, 2016 Author Share Posted August 9, 2016 That's why I'm asking you download And see the issue I'm having: Login studied instead TXT file Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535851 Share on other sites More sharing options...
maor Posted August 9, 2016 Author Share Posted August 9, 2016 <?php $filename= dirname(__FILE__)."/data.txt"; $lastmodif = isset( $_GET['timestamp'])? $_GET['timestamp']: 0 ; $currentmodif=filemtime($filename); while ($currentmodif <= $lastmodif) { usleep(10000); clearstatcache(); $currentmodif =filemtime($filename); } $response = array(); $response['msg'] =Date("h:i:s")." ".file_get_contents($filename); $response['timestamp']= $currentmodif; echo json_encode($response); ?> It will be a database Thanks Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535853 Share on other sites More sharing options...
ginerjm Posted August 9, 2016 Share Posted August 9, 2016 (edited) Login studied instead TXT file Besides your mistitle/misspelled title for this post, you seem to be unable to post a sensible question. Just what does the quoted line above mean? Edited August 9, 2016 by ginerjm Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535857 Share on other sites More sharing options...
requinix Posted August 9, 2016 Share Posted August 9, 2016 Sounds like OP is using a script that polls a file('s modification time) and needs it to be polling against a database instead. Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535860 Share on other sites More sharing options...
Jacques1 Posted August 9, 2016 Share Posted August 9, 2016 Sure, but without concrete information, I don't think this thread will go anywhere. Quote Link to comment https://forums.phpfreaks.com/topic/301792-long-pool-please/#findComment-1535861 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.