SRL Archive - News and General

request (PHP)


HayHay89

2008-10-13 02:54:31

hello
i no im not around much but

i need someones help
i need some who knows php
and is able to create a script that would download and install java to a server
and start and reset the server ever 30 mins

so i can host my private server

thanks

speak to dans the man for information

i would be very greatfull if some1 could do this for me

Esteban

2008-10-13 07:59:53

If Pentii was still around, I'm sure he could help you out. He doesn't get on here much at all, but I have his MSN if you need it. I would recommend posting in the Web development section here asking for help with what you need.

Hugolord

2008-10-13 08:06:29

Drunken w.e it is is a PHP master methinks, pm him.

Esteban

2008-10-13 08:13:58

From: Hugolord
Drunken w.e it is is a PHP master methinks, pm him.


When's the last time we've seen him around here =/?

MylesMadness

2008-10-13 10:50:34

Yeah, why are all the php dudes gone :p. c0de is still around. pm him

Negaal

2008-10-13 11:47:37

[PHP]
$file = 'http://www.example.com/file.exe';
$tmpfname = tempnam("tmp/", "TmP-");
$temp = @fopen($tmpfname, "w");
@fwrite($temp, @file_get_contents($file)) or die("Cannot download file");
@fclose($temp);
$file = $tmpfname;[/PHP]

Well, this may help at getting file..I'm not sure it works, didn't test.

E: Sure it's possible to install the software with php script? and why do you have to dl it every 30 min?

Camaro'

2008-10-13 12:12:42

From: Negaal
[PHP]
$file = 'http://www.example.com/file.exe';
$tmpfname = tempnam("tmp/", "TmP-");
$temp = @fopen($tmpfname, "w");
@fwrite($temp, @file_get_contents($file) or die("Cannot download file");
@fclose($temp);
$file = $tmpfname;[/PHP]

Well, this may help at getting file..I'm not sure it works, didn't test.

E: Sure it's possible to install the software with php script? and why do you have to dl it every 30 min?


Well , i think he ment he wanted the server to restart every 30 minuites im guessing. but if he wanted that why dont you just use an auto restarter.

Zezi

2008-10-13 12:51:29

use a cron job on a server, to initiate a script,
don't think php is the correct language for this job, if it is, and you're certain i'll make it for you, lol

mixster

2008-10-13 14:09:14

php is only executed when a page is loaded. You want a script or application that runs on the server, not just when requested by client. PHP is the wrong language for this, though I suppose you could use it to install the Java (by uploading the files to the server), but past that you would only be able to do it with great difficulty and having a page open that auto-refreshed every half an hour running at all times.

HayHay89

2008-10-14 00:57:52

hmm i see

well im not sure

kingarabian

2008-10-14 01:30:18

Talk to Munk, hes still around.

Zezi

2008-10-14 12:15:08

From: mixster
php is only executed when a page is loaded. You want a script or application that runs on the server, not just when requested by client. PHP is the wrong language for this, though I suppose you could use it to install the Java (by uploading the files to the server), but past that you would only be able to do it with great difficulty and having a page open that auto-refreshed every half an hour running at all times.


that r liez

if you make a cron job to execute the server-side script then it might be the right language, lol!

mixster

2008-10-14 14:11:33

Making a cron job still means it's loaded by the client, the client just also happens to be the server, while you could just write an app in a language meant for "serious" things rather than just displaying webpages. Also, not sure how easy it would be to get php to access the Java app, so it may actually be easier to make an app in Java that accesses it and thus allow the nativity to possibly help, though most other major languages would probably offer good support for similar things as well.