Current location: Hot Scripts Forums » Programming Languages » PHP » Php Run Script On Remote Server


Php Run Script On Remote Server

Reply
  #1 (permalink)  
Old 01-03-10, 12:46 PM
hunterhdolan hunterhdolan is offline
Newbie Coder
 
Join Date: Oct 2009
Posts: 30
Thanks: 5
Thanked 0 Times in 0 Posts
Question Php Run Script On Remote Server

I am designing an open source mail client! And need some help with my auto update system. Here is what I have been thinking....

During Install the url and path to the update script is recorded in a file on my server. Finished!

When an update is available I go to a script on my server and it goes to the update script on numerous servers. (That is what i need help with)

The Update Script Runs, Downloads, Unzips, and Deletes the Zip Folder. Finished!

At next log in a script installs the updates. Finished!

The Admin is notified about the recent updates. Finished!

That way the admin does not have to setup a cron job or schedule a windows command!!!

I just need a script that can trigger the command on multiple servers. Right now I can access the script and it runs by just going to the php script in the url bar. Thank you for the help!

PS I don't care if it ends up looking like this

PHP Code:

<?php

Command to go to script on remote server
?>
<?php
Command to go to script on remote server
?>
My Server has unlimited space and is VERY powerful. Thanks!

-HD
__________________
I was laying in bed last night looking at the stars..... Then it occurred to me. Where the hell is the ceiling!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-03-10, 02:42 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
You might want to try wget or curl, in a loop - I'd use bash instead of PHP, since invocation doesn't need a lot of logic or control.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 01-03-10, 03:10 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by hunterhdolan View Post
The Update Script Runs, Downloads, Unzips, and Deletes the Zip Folder. Finished!
At next log in a script installs the updates. Finished!
The Admin is notified about the recent updates. Finished!
You may want to think twice about this...I would be extremely uncomfortable installing anything on my servers that would update software without my direct control and/or permission.

I'd also worry about this being used maliciously. If someone could manage to get their own ZIP file to be loaded, well....the possibilities are endless, and not in a good way.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 01-03-10, 05:15 PM
hunterhdolan hunterhdolan is offline
Newbie Coder
 
Join Date: Oct 2009
Posts: 30
Thanks: 5
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by End User View Post
You may want to think twice about this...I would be extremely uncomfortable installing anything on my servers that would update software without my direct control and/or permission.

I'd also worry about this being used maliciously. If someone could manage to get their own ZIP file to be loaded, well....the possibilities are endless, and not in a good way.
I forgot to mention that it is an option in the installer and admin panel. The zip is just the same as the latest version with the config files left out. I am even planning to have it back up the scripts folder incase someone wants to revert. Thanks wirehopper I like your idea about using curl. Thanks everyone!
__________________
I was laying in bed last night looking at the stars..... Then it occurred to me. Where the hell is the ceiling!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 01-04-10, 05:58 PM
cayennecoder cayennecoder is offline
New Member
 
Join Date: Jan 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Hey this might sound really newbish and it is but I cannot for the life of me find any where that explains this question

How do I use/upload php scripts (or any scripts for that matter) to my local host and/or dream weaver for edit/viewing/functioning ?



Thank You
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 01-04-10, 06:16 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Configure Dreamweaver's FTP to your server's settings, use the browser to view the pages.

Be sure to name the files with .php for an extension.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 01-05-10, 02:50 PM
cayennecoder cayennecoder is offline
New Member
 
Join Date: Jan 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
FTP? Even for local host? Sorry my bad maybe I'll ellaborate a little

I want to make a website script viewable through a LOCAL Host on my browser and dreamweaver for editing
Even when I set DreamW. to access the remote Appserv root folder or the script folder
(not sure if I should be pointing to the script folder since it could be conisidered the root folder? for that website script ) - but I tried both and couldn't get the website visual running in the DW. or the browser but I obviously can see the code through dw. etc.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 01-05-10, 03:56 PM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Do you have a web server running or does Dreamweaver provide one?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 01-07-10, 02:15 AM
cayennecoder cayennecoder is offline
New Member
 
Join Date: Jan 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by wirehopper View Post
Do you have a web server running or does Dreamweaver provide one?
I have a local host set up on my computer through appserv (like xaampp/wamp etc) does that help?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #10 (permalink)  
Old 01-07-10, 07:10 AM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Be sure to place your .php files in XAMPP's DocumentRoot (might be something like C:\XAMPP\apache\htdocs\public_root).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Your Own Profitable and VERY unique eBusiness Voltaire General Advertisements 3 03-30-10 07:36 AM
[SOLVED] it works on localhost but not on hosting account? myslowquietlife PHP 42 12-19-08 10:31 AM
[SOLVED] How to access remote server using php? douffle PHP 3 05-06-08 01:38 AM
script to test php mail on server - HELP bloodl PHP 5 07-25-07 08:29 PM
asp script run autonomously on server shermski ASP 4 10-03-05 08:09 AM


All times are GMT -5. The time now is 04:47 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.