Jump to content


Photo

Automatically run a SOAP Connection every 10-15minutes?

soap connection api

  • Please log in to reply
11 replies to this topic

#1 halben

halben

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 18 October 2013 - 12:07 PM

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



#2 vinny42

vinny42

    Advanced Member

  • Members
  • PipPipPip
  • 414 posts

Posted 18 October 2013 - 12:10 PM

Yes, see: crontab on un*x, or windows scheduler.



#3 halben

halben

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 18 October 2013 - 12:20 PM

Is that the best way to approach? 


Edited by halben, 18 October 2013 - 12:20 PM.


#4 vinny42

vinny42

    Advanced Member

  • Members
  • PipPipPip
  • 414 posts

Posted 18 October 2013 - 12:22 PM

It's the only way.



#5 halben

halben

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 18 October 2013 - 12:33 PM

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 by halben, 18 October 2013 - 12:33 PM.


#6 halben

halben

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 18 October 2013 - 01:56 PM

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 by halben, 18 October 2013 - 01:58 PM.


#7 vinny42

vinny42

    Advanced Member

  • Members
  • PipPipPip
  • 414 posts

Posted 18 October 2013 - 02:05 PM


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.



#8 halben

halben

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 18 October 2013 - 02:19 PM

What I meant was can I make HTTP request to call the script since my script is on the server?



#9 vinny42

vinny42

    Advanced Member

  • Members
  • PipPipPip
  • 414 posts

Posted 18 October 2013 - 03:10 PM

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.



#10 halben

halben

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 18 October 2013 - 03:17 PM

I found 2 links regarding to automating services:

 

1) http://www.redolived...cheduled-tasks/

 

 

2) http://amitdhamu.com...task-scheduler/

 

I'm just not sure which to use.



#11 vinny42

vinny42

    Advanced Member

  • Members
  • PipPipPip
  • 414 posts

Posted 19 October 2013 - 02:04 AM

It really doesn't matter, both use the scheduler and both will start a PHP script and that is all yo need.



#12 halben

halben

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 21 October 2013 - 07:58 AM

Thanks for the assistance. I'm still pretty new to this so I'll keep on researching. 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com