Re: [PHP] Howto: run local script to update remote script

2002-12-05 Thread David T-G
eriol --

Yes, a cron job would do the trick for a process that must run at fixed
and frequest intervals.  The Windows scheduler might accomplish the same
thing.

Since we've already veered sharply off-topic, I'll go ahead and recommend
that you check out dyndns.org or the like; set up your address (they'll
give you one like eriol.dyndns.org for free), download some software to
your box, and then it will always be available at that fully-qualified
name, without any PHP magic; your friends would just point a browser or
ftp client to eriol.dyndns.org and start sucking down MP3s.

If you do go with a php script (on either end), be careful how you then
implement it; anyone could hijack your pointer by connecting to the same
script with your "password".  Better to do something like encrypt your
current [external, of course] IP address (and maybe timestamp and maybe
who knows what else, with the more you can throw on the better) with a
secret password and send the garbage over the wire to your Linux server;
the script there also knows the password and decrypts the stuff and
checks to see that the sent IP matches the sending IP (and anything else
that you want to check) but you haven't actually exposed your password on
the wire.


HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg88457/pgp0.pgp
Description: PGP signature


Re: [PHP] Howto: run local script to update remote script

2002-12-04 Thread Marek Kilimajer
You need to open http connection to the server from you local php:
http://server/script.php?password=yoursecretstring','r');
fclose($f);
?>

in the script.php check the password and then $_SERVER['REMOTE_ADDR']

eriol wrote:


I was wondering how I could have a local PHP (4.2.3) script running on Apache
1.3.27 / WinXP Pro send my current local IP address to a remote server running
PHP 4.1.2, RedHat 7.3 & Apache 1.3.26.. In the Linux based script, I'd want it
to basically display my current IP address to friends who know the remote URL to
connect to my FTP/HTTP server(s) and grab mp3s, etc..

I'm a complete newbie, and in my php.net/google.com searches the only thing I've
come across is something called a CRON Job.. From my little experience and
understanding, I've always thought a Cron Job was something that only was valid
on *nix platforms and not Win32.. Am I mistaken?  My remote linux server has a
dedicated IP, although my Win32 machine obviously doesn't.. I assume this would
make it easier to communicate from local to remote?


From my little understanding, I assume the local script would need to place my

IP address in a variable (within say: ipaddy.inc) and the remote script would be
updated as the variable was read from ipaddy.inc when someone visited the
page..?

If anyone could point me to a tutorial, function name(s) or offer some code to
get me started, I'd greatly appreciate it.. Apache & PHP load on my local
(Win32) machine when it boots and it's always running.. I just can't get past
the auto-run-a-local-php-script area for the most part..

TIA..

Take care.. peace..
eriol




 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Howto: run local script to update remote script

2002-12-03 Thread eriol
I was wondering how I could have a local PHP (4.2.3) script running on Apache
1.3.27 / WinXP Pro send my current local IP address to a remote server running
PHP 4.1.2, RedHat 7.3 & Apache 1.3.26.. In the Linux based script, I'd want it
to basically display my current IP address to friends who know the remote URL to
connect to my FTP/HTTP server(s) and grab mp3s, etc..

I'm a complete newbie, and in my php.net/google.com searches the only thing I've
come across is something called a CRON Job.. From my little experience and
understanding, I've always thought a Cron Job was something that only was valid
on *nix platforms and not Win32.. Am I mistaken?  My remote linux server has a
dedicated IP, although my Win32 machine obviously doesn't.. I assume this would
make it easier to communicate from local to remote?

>From my little understanding, I assume the local script would need to place my
IP address in a variable (within say: ipaddy.inc) and the remote script would be
updated as the variable was read from ipaddy.inc when someone visited the
page..?

If anyone could point me to a tutorial, function name(s) or offer some code to
get me started, I'd greatly appreciate it.. Apache & PHP load on my local
(Win32) machine when it boots and it's always running.. I just can't get past
the auto-run-a-local-php-script area for the most part..

TIA..

Take care.. peace..
eriol




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php