How can I securely send a url with GET info from a crontab php script to another server?
| From: | Daevid Vincent | Date: | Sat, 03 May 2003 02:26:19 +0000 |
| Subject: | How can I securely send a url with GET info from a crontab php script to another server? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-146226@lists.php.net to get a copy of this message | ||
I have a client PHP script I'm writing that will execute via crontab. I need
it to collect some info about the system (cpu, ram, hd, uptime, etc) and
then send it to another server on the internet where I can log the info into
a mysql database.
I was thinking a url like so:
http://checkin.mycompany.com/checkin.php?cpu=1000&ram=256&uptime=1.0,2.0,3.0
&....
My first question is, how do I actually do that the best way? Shall I use
the header() or fopen() or fsockopen()? I was thinking I could also encrypt
the whole string somehow so it would be like
http://checkin.mycompany.com/checkin.php?info=ap34um5sfo85s5o8sop58sp84a84y5
8ay4nay984nyf0a9ny40
(Then just split it back out on the server end again based upon my
algorithm.)
Or is it better to simulate a form post (GET/POST) simulation somehow?
And if so, how can I 'secure' that?
My apache server has https:// enabled.
The key here is that the 'clients' might be behind firewalls, and so it's
most likely that port 80 will be open.
Working examples (links/code) greatly appreciated.