halben Posted October 18, 2013 Share Posted October 18, 2013 Hi PHPFreaks =), I'm in need of some guidance. Is it possible and safe to open a SOAP Connection every 10-15 minutes? Thanks, Hal Quote Link to comment Share on other sites More sharing options...
vinny42 Posted October 18, 2013 Share Posted October 18, 2013 Yes, see: crontab on un*x, or windows scheduler. Quote Link to comment Share on other sites More sharing options...
halben Posted October 18, 2013 Author Share Posted October 18, 2013 (edited) Is that the best way to approach? Edited October 18, 2013 by halben Quote Link to comment Share on other sites More sharing options...
vinny42 Posted October 18, 2013 Share Posted October 18, 2013 It's the only way. Quote Link to comment Share on other sites More sharing options...
halben Posted October 18, 2013 Author Share Posted October 18, 2013 (edited) Bummer. Let me know if I'm going in the right direction. I'm working on a WordPress website where new users who registers to the site gets their information stored into the WP database and an external database. I have that fully functional from WordPress DB syncing/updating users information to an external DB. I'm trying to get the external DB to do the same thing to the WordPress DB. What I'm basically trying to do is listen for changes in the external DB so if anything changes in it, it would update only 1 field in the WordPress DB. This is possible right? Edited October 18, 2013 by halben Quote Link to comment Share on other sites More sharing options...
halben Posted October 18, 2013 Author Share Posted October 18, 2013 (edited) How would I configure the script to run if the sript is the server? php -f /path/to/script.php I'm assuming this line of code only retrieves the file from the local computer. Edited October 18, 2013 by halben Quote Link to comment Share on other sites More sharing options...
vinny42 Posted October 18, 2013 Share Posted October 18, 2013 How would I configure the script to run if the sript is the server? I don't understand what you mean, this starts a script that does whatever you program it to do. How you start the script doesn't change what the script does. Quote Link to comment Share on other sites More sharing options...
halben Posted October 18, 2013 Author Share Posted October 18, 2013 What I meant was can I make HTTP request to call the script since my script is on the server? Quote Link to comment Share on other sites More sharing options...
vinny42 Posted October 18, 2013 Share Posted October 18, 2013 The script in the cron can ado everything that PHP can do, including seoind request to any server, incuding your server because it's just another server. Quote Link to comment Share on other sites More sharing options...
halben Posted October 18, 2013 Author Share Posted October 18, 2013 I found 2 links regarding to automating services: 1) http://www.redolivedesign.com/utah-web-designers-blog/2007/11/17/how-to-run-a-php-or-asp-file-on-a-schedule-with-windows-xmlhttp-object-and-scheduled-tasks/ 2) http://amitdhamu.com/blog/automating-php-using-task-scheduler/ I'm just not sure which to use. Quote Link to comment Share on other sites More sharing options...
vinny42 Posted October 19, 2013 Share Posted October 19, 2013 It really doesn't matter, both use the scheduler and both will start a PHP script and that is all yo need. Quote Link to comment Share on other sites More sharing options...
halben Posted October 21, 2013 Author Share Posted October 21, 2013 Thanks for the assistance. I'm still pretty new to this so I'll keep on researching. Quote Link to comment 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.