www.webdeveloper.com
Results 1 to 8 of 8

Thread: Calling a PHP file remotely?

  1. #1
    Join Date
    Jul 2007
    Posts
    31

    Calling a PHP file remotely?

    Not even sure if this is the right forum.

    I'm a web/database developer in a specific office at a large academic medical center. Our central ITS doesn't give "field" people cpanel access to the webservers, so I can't schedule cron jobs for things like backup of mysql.

    Now, they backup for us, but they backup onto tape, which is sketchy on reliability, and it can take days and weeks for restoration since they server the whole institution.

    I've been manually dumping to .sql through phpMyAdmin, but what I'd really like to do is automate this.

    I'd like to create a php script to do the dump, but somehow call it from a desktop machine or some other remote method. I have my own personal web server for various other things. Is there any way I could schedule from that other server or a desktop PC to call a backup script in that way?

    Thanks.

  2. #2
    Join Date
    May 2006
    Posts
    31
    If you are the developer you can create a page that displays the table. and scrape the data off the page into a notepad file. If you wan't to save it so that it can be restored, you will need to add the text around it INSERT INTO etc.

    Desmond.

  3. #3
    Join Date
    Jul 2007
    Posts
    31
    Well, the problem is this is a MASSIVE database....well...not in in comparison to say a Vbulletin installation, but 14 tables and some tables have as many as 3000 records.

    That would be one ginormous table...

  4. #4
    Join Date
    May 2006
    Posts
    31
    In that case the only thing I could sugest is that you do as I sugested before but instead write the information to a file on the server. You could give it an extension of .dat. Another page could be set to give you the option of downloading the file.

    Would that be better.

    Desmond.

  5. #5
    Join Date
    Jul 2007
    Posts
    31
    Yeah, the actual dump isn't the hard part...its how do I make it automatic w/o access to set up cron jobs?

  6. #6
    Join Date
    May 2006
    Posts
    31
    You won't be able to automate it. You would have to access a web page each time. Even the database won't automate. Some form of triiger would be required. If you are trying to by-pass the DBA's then you will have to do a work around.

    Desmond.

  7. #7
    Join Date
    May 2007
    Location
    Cleveland, OH
    Posts
    1,403
    Here's what I'd do. Include a function call with an onLoad event handler to a function included on an external file. Then have that file call a PHP script which contains the queries to back-up the database, but have it have a conditional to only run once and only on certain days, (ie, 1,7,14,21,28 of every month).

    Put that onto a frequently visited page, and voila. It's a random chance thing, but if your page generates 1+hit a day you'll be ok lol.
    Last edited by TJ111; 07-13-2007 at 10:49 AM.

  8. #8
    Join Date
    May 2006
    Posts
    31
    You could make a a web page a default in your browser and add the browser's exe to windows startup regestry entry. !!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles