Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.www.php > #21514
| From | NoS <NoS@nospam.no> |
|---|---|
| Newsgroups | it.comp.www.php |
| Subject | redirect tramite cron su file php remoto |
| Date | 2017-03-21 08:30 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <oaqkr9$1f5k$1@gioia.aioe.org> (permalink) |
Buongiorno a tutti,
la situazione è la seguente:
1 - devo lanciare uno script php che esegue alcune operazione e si trova
sul dominio AAA -> http://AAA.com/script.php.
2 - non ho possibilità di settare un CRON su quel server (è un host di
quelli a pochi euro e non me lo consente)
3 - quindi, tramite un altro server (BBB) che gestisco direttamente
avevo pensato di impostare un CRON che chiamasse un file presente su BBB
che andasse a chiamare http://AAA.com/script.php.
In pratica ho creato un file: http://BBB.com/lanciascript.php contenente
<?php
$linkToBackUp = "http://AAA.com/script.php";
header("Location: ".$linkToBackUp);
?>
Cosa succede:
- se da browser chiamo il file http://BBB.com/lanciascript.php tutto va
a buon fine, con il redirect che viene eseguito e viene lanciato
http://AAA.com/script.php.
- se però, imposto un CRON, sul server BBB, il cui compito è eseguire
http://BBB.com/lanciascript.php, l'operazione di CRON viene eseguita ma
la chiamata/redirect non va a buon fine ed il log del CRON mi
restituisce un errore 302.
Sperando d'essermi spiegato.... cosa sto sbagliando?
Grazie in anticipo.
Back to it.comp.www.php | Previous | Next — Next in thread | Find similar | Unroll thread
redirect tramite cron su file php remoto NoS <NoS@nospam.no> - 2017-03-21 08:30 +0100
Re: redirect tramite cron su file php remoto Alessandro Pellizzari <shuriken@amiran.it> - 2017-03-21 11:09 +0000
Re: redirect tramite cron su file php remoto NoS <NoS@nospam.no> - 2017-03-21 12:10 +0100
csiph-web