p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: Newbie needs help - getting form to post automatically via a cron job


Message #1 by "Mel Guiver" <sales@w...> on Sun, 10 Feb 2002 20:47:18
How can I get a PHP form to post from my server (not my PC) automatically? 

using a cron job



When you load a form from your browser you can include in the HTML

"onload submit" and it will submit the form automatically - how can I get 

the same effect with a php form with preset information so that I can run 

it as a cron job on a regular daily basis



Any help would be most appreciated



Thanks Mel
Message #2 by "Hermawan Haryanto" <hermawan@h...> on Mon, 11 Feb 2002 04:01:36 +0700
May be if your posting acceptor page can receive/process GET method, then

your problem will be solved with just redirecting that PHP page to the

posting acceptor page with submited variables as query strings.



Thanks

Hermawan Haryanto

hermawan@h...







----- Original Message -----

From: "Mel Guiver" <sales@w...>

To: "beginning php" <beginning_php@p...>

Sent: Sunday, February 10, 2002 8:47 PM

Subject: [beginning_php] Newbie needs help - getting form to post

automatically via a cron job





> How can I get a PHP form to post from my server (not my PC) automatically?

> using a cron job

>

> When you load a form from your browser you can include in the HTML

> "onload submit" and it will submit the form automatically - how can I get

> the same effect with a php form with preset information so that I can run

> it as a cron job on a regular daily basis

>

> Any help would be most appreciated

>

> Thanks Mel




$subst('Email.Unsub').

>



Message #3 by "Mel Guiver" <sales@w...> on Sun, 10 Feb 2002 21:50:27
Thanks for your reply I must admit you have got  me a bit lost now



Let me tell you what one of the things I am trying to do is.



I have a message board that is a perl/cgi based, each night I will run a 

archive program that will clear the board down



What I also want to do is post a message each evening to my board



Along the lines of: 



"Welcome to the forum ,the board has just been reset and is now open for 

new postings"



Normally, as you know, to post a message you would use a template similar 

to this one except it is a cgi script and upon completion you just submit 

the form



The post action is Form Method=Post followed by the path to the script



I was thinking that it should be possible to use a php form with the 

pathway to the board, identical fields and a preset message in the fields 

to post automatically each evening using a cron job on the server



 





> May be if your posting acceptor page can receive/process GET method, then

> your problem will be solved with just redirecting that PHP page to the

> posting acceptor page with submited variables as query strings.

> 

> Thanks

> Hermawan Haryanto

> hermawan@h...

> 

> 

> 

> ----- Original Message -----

> From: "Mel Guiver" <sales@w...>

> To: "beginning php" <beginning_php@p...>

> Sent: Sunday, February 10, 2002 8:47 PM

> Subject: [beginning_php] Newbie needs help - getting form to post

> automatically via a cron job

> 

> 

> > How can I get a PHP form to post from my server (not my PC) 

automatically?

> > using a cron job

> >

> > When you load a form from your browser you can include in the HTML

> > "onload submit" and it will submit the form automatically - how can I 

get

> > the same effect with a php form with preset information so that I can 

run

> > it as a cron job on a regular daily basis

> >

> > Any help would be most appreciated

> >

> > Thanks Mel




> $subst('Email.Unsub').

> >

> 

Message #4 by "Hermawan Haryanto" <hermawan@h...> on Mon, 11 Feb 2002 05:20:10 +0700
Sorry if I got you confuse.

What I'm trying to said is can you make some change so your action page can

accept GET method instead of only POST method, coz if it is then you can

make the something like this:



Before :

<body onLoad="form1.submit();">

<form name="form1" method="post" action="someurl.cgi?var1=1&var2=2">

<input type="hidden" name="myoriginalvar" value="blabla">

<input type="submit" value="done">

</form>



With PHP

<?php

  Header("Location:./someurl.cgi?var1=1&var2=2&myoriginalvar=blabla");

?>



Then run that PHP script as cron with lynx. But I suggest to not run it with

Lynx, but run it using PHP as CGI Command Line



Thanks

Hermawan Haryanto

hermawan@h...





----- Original Message -----

From: "Mel Guiver" <sales@w...>

To: "beginning php" <beginning_php@p...>

Sent: Sunday, February 10, 2002 9:50 PM

Subject: [beginning_php] Re: Newbie needs help - getting form to post

automatically via a cron job





> Thanks for your reply I must admit you have got  me a bit lost now

>

> Let me tell you what one of the things I am trying to do is.

>

> I have a message board that is a perl/cgi based, each night I will run a

> archive program that will clear the board down

>

> What I also want to do is post a message each evening to my board

>

> Along the lines of:

>

> "Welcome to the forum ,the board has just been reset and is now open for

> new postings"

>

> Normally, as you know, to post a message you would use a template similar

> to this one except it is a cgi script and upon completion you just submit

> the form

>

> The post action is Form Method=Post followed by the path to the script

>

> I was thinking that it should be possible to use a php form with the

> pathway to the board, identical fields and a preset message in the fields

> to post automatically each evening using a cron job on the server

>

>





Message #5 by "Mel Guiver" <sales@w...> on Sun, 10 Feb 2002 22:48:30
Not your fault, it takes me a while to absorb this



Below is a link to the message board program that I am using, so that you 

can have a look at the source code, regarding the posting method



http://awsd.com/scripts/forum/webbbs/index.cgi/noframes/form/0





As this is written by a third party and not me - I am guessing that I will 

not be able to change the the action page?



Or am I geting this totally wrong?



If I cannot use this route is there another way?



If you can walk me through this I would appreciate it







> Sorry if I got you confuse.

> What I'm trying to said is can you make some change so your action page 

can

> accept GET method instead of only POST method, coz if it is then you can

> make the something like this:

> 

> Before :

> <body onLoad="form1.submit();">

> <form name="form1" method="post" action="someurl.cgi?var1=1&var2=2">

> <input type="hidden" name="myoriginalvar" value="blabla">

> <input type="submit" value="done">

> </form>

> 

> With PHP

> <?php

>   Header("Location:./someurl.cgi?var1=1&var2=2&myoriginalvar=blabla");

> ?>

> 

> Then run that PHP script as cron with lynx. But I suggest to not run it 

with

> Lynx, but run it using PHP as CGI Command Line

> 

> Thanks

> Hermawan Haryanto

> hermawan@h...

> 

> 

> ----- Original Message -----

> From: "Mel Guiver" <sales@w...>

> To: "beginning php" <beginning_php@p...>

> Sent: Sunday, February 10, 2002 9:50 PM

> Subject: [beginning_php] Re: Newbie needs help - getting form to post

> automatically via a cron job

> 

> 

> > Thanks for your reply I must admit you have got  me a bit lost now

> >

> > Let me tell you what one of the things I am trying to do is.

> >

> > I have a message board that is a perl/cgi based, each night I will run 

a

> > archive program that will clear the board down

> >

> > What I also want to do is post a message each evening to my board

> >

> > Along the lines of:

> >

> > "Welcome to the forum ,the board has just been reset and is now open 

for

> > new postings"

> >

> > Normally, as you know, to post a message you would use a template 

similar

> > to this one except it is a cgi script and upon completion you just 

submit

> > the form

> >

> > The post action is Form Method=Post followed by the path to the script

> >

> > I was thinking that it should be possible to use a php form with the

> > pathway to the board, identical fields and a preset message in the 

fields

> > to post automatically each evening using a cron job on the server

> >

> >

> 

> 

Message #6 by "Hermawan Haryanto" <hermawan@h...> on Mon, 11 Feb 2002 06:00:03 +0700
I've download the webBBS 5.0, now in which section you want the PHP to work

as cron?

If I can help you out then I will.



Thanks

Hermawan Haryanto

hermawan@h...



----- Original Message -----

From: "Mel Guiver" <sales@w...>

To: "beginning php" <beginning_php@p...>

Sent: Sunday, February 10, 2002 10:48 PM

Subject: [beginning_php] Re: Newbie needs help - getting form to post

automatically via a cron job





> Not your fault, it takes me a while to absorb this

>

> Below is a link to the message board program that I am using, so that you

> can have a look at the source code, regarding the posting method

>

> http://awsd.com/scripts/forum/webbbs/index.cgi/noframes/form/0

>

>

> As this is written by a third party and not me - I am guessing that I will

> not be able to change the the action page?

>

> Or am I geting this totally wrong?

>

> If I cannot use this route is there another way?

>

> If you can walk me through this I would appreciate it

>





Message #7 by "Mel Guiver" <sales@w...> on Mon, 11 Feb 2002 00:14:56
OK



Lets assume that a board is up and running



The page that I took you to was the page where you would normally go to in 

the browser and type in your message and then submit the form manually, 

which in turn ads your message to the message board - similar to how this 

forum works



What I want to do is to make up a message post form and put in preset 

values for the email address,name,subject line and message, plus of course 

the pathway to where the actual script is  



Then put the form onto my server and run it as a cron job each night - so 

that it automatically posts the pre-formated message each evening without 

the need for me to submit the form  manually each night



Making up the form does not seem to be too much of a problem as long as I 

use the same field names etc - but how do I get it to post automatically 

each night, without any intervention on my part - thats the bit I can not 

get figure out



Thanks for sticking with me on this, appreciate it

Mel





> I've download the webBBS 5.0, now in which section you want the PHP to 

work

> as cron?

> If I can help you out then I will.

> 

> Thanks

> Hermawan Haryanto

> hermawan@h...

> 

> ----- Original Message -----

> From: "Mel Guiver" <sales@w...>

> To: "beginning php" <beginning_php@p...>

> Sent: Sunday, February 10, 2002 10:48 PM

> Subject: [beginning_php] Re: Newbie needs help - getting form to post

> automatically via a cron job

> 

> 

> > Not your fault, it takes me a while to absorb this

> >

> > Below is a link to the message board program that I am using, so that 

you

> > can have a look at the source code, regarding the posting method

> >

> > http://awsd.com/scripts/forum/webbbs/index.cgi/noframes/form/0

> >

> >

> > As this is written by a third party and not me - I am guessing that I 

will

> > not be able to change the the action page?

> >

> > Or am I geting this totally wrong?

> >

> > If I cannot use this route is there another way?

> >

> > If you can walk me through this I would appreciate it

> >

> 

> 

Message #8 by "Krister" <krister@m...> on Mon, 11 Feb 2002 01:26:01 +0100
Hi Mel



You can use the very same 'onload' with php.



Krister



----- Original Message -----

From: "Mel Guiver" <sales@w...>

To: "beginning php" <beginning_php@p...>

Sent: Sunday, February 10, 2002 8:47 PM

Subject: [beginning_php] Newbie needs help - getting form to post

automatically via a cron job





> How can I get a PHP form to post from my server (not my PC) automatically?

> using a cron job

>

> When you load a form from your browser you can include in the HTML

> "onload submit" and it will submit the form automatically - how can I get

> the same effect with a php form with preset information so that I can run

> it as a cron job on a regular daily basis

>

> Any help would be most appreciated

>

> Thanks Mel




$subst('Email.Unsub').

>



Message #9 by "Mel Guiver" <sales@w...> on Mon, 11 Feb 2002 09:07:40
Hi Krister



I guess you have been following this thread and know what I am trying to do



Does that mean I can run it as a cron job and it will automatically post

without the need for me to open a browser window physicaly myself?







> Hi Mel

> 

> You can use the very same 'onload' with php.

> 

> Krister

> 

> ----- Original Message -----

> From: "Mel Guiver" <sales@w...>

> To: "beginning php" <beginning_php@p...>

> Sent: Sunday, February 10, 2002 8:47 PM

> Subject: [beginning_php] Newbie needs help - getting form to post

> automatically via a cron job

> 

> 

> > How can I get a PHP form to post from my server (not my PC) 

automatically?

> > using a cron job

> >

> > When you load a form from your browser you can include in the HTML

> > "onload submit" and it will submit the form automatically - how can I 

get

> > the same effect with a php form with preset information so that I can 

run

> > it as a cron job on a regular daily basis

> >

> > Any help would be most appreciated

> >

> > Thanks Mel




> $subst('Email.Unsub').

> >

> 

Message #10 by "Krister" <krister@m...> on Mon, 11 Feb 2002 16:18:43 +0100
Hi Mel



I don't know what 'cron job' is, but all you can do with html/javascript can

be done also with php. This means that you can add those things just as

before. You can write them in your php-script or break your script and add

them as always. Php is only one thing more and it does not limit your use of

html or javascript.



Krister

----- Original Message -----

From: "Mel Guiver" <sales@w...>

To: "beginning php" <beginning_php@p...>

Sent: Monday, February 11, 2002 9:07 AM

Subject: [beginning_php] Re: Newbie needs help - getting form to post

automatically via a cron job





> Hi Krister

>

> I guess you have been following this thread and know what I am trying to

do

>

> Does that mean I can run it as a cron job and it will automatically post

> without the need for me to open a browser window physicaly myself?

>

>

>

> > Hi Mel

> >

> > You can use the very same 'onload' with php.

> >

> > Krister

> >

> > ----- Original Message -----

> > From: "Mel Guiver" <sales@w...>

> > To: "beginning php" <beginning_php@p...>

> > Sent: Sunday, February 10, 2002 8:47 PM

> > Subject: [beginning_php] Newbie needs help - getting form to post

> > automatically via a cron job

> >

> >

> > > How can I get a PHP form to post from my server (not my PC)

> automatically?

> > > using a cron job

> > >

> > > When you load a form from your browser you can include in the HTML

> > > "onload submit" and it will submit the form automatically - how can I

> get

> > > the same effect with a php form with preset information so that I can

> run

> > > it as a cron job on a regular daily basis

> > >

> > > Any help would be most appreciated

> > >

> > > Thanks Mel




> > $subst('Email.Unsub').

> > >

> >

>




$subst('Email.Unsub').



Message #11 by "Mel Guiver" <sales@w...> on Mon, 11 Feb 2002 18:21:33
Hello Krister



A cron Job is a job that you can set up on your server to run automatically

at a pre-determined timed, once a month, or once a day or even every hour



So if you have a message board you can clear the board down to zero 

messages each day using an archive program the cron will run this at the 

time you request it to - much like the scheduler on windows



What I want to do is run another job that automatically post a message to 

my board at lets say 2 in the morning saying the board has been reset,etc



The question is how do we get a form to post automatically without any 

human intervention - as I do not really want to be sitting up at 2 in the 

morning everday



We know how to do it if you call it from a browser window you can use ' 

onload. submit, etc' but how do you do it from a server?



There must be someone out there that can answer this?



Compared to some other questions that I have seen on various forums, this 

seems like a walk in the park - the only problem is I just don't know how 

to do it - and its driving nutty



Mel





> Hi Mel

> 

> I don't know what 'cron job' is, but all you can do with html/javascript 

can

> be done also with php. This means that you can add those things just as

> before. You can write them in your php-script or break your script and 

add

> them as always. Php is only one thing more and it does not limit your 

use of

> html or javascript.

> 

> Krister

> ----- Original Message -----

> From: "Mel Guiver" <sales@w...>

> To: "beginning php" <beginning_php@p...>

> Sent: Monday, February 11, 2002 9:07 AM

> Subject: [beginning_php] Re: Newbie needs help - getting form to post

> automatically via a cron job

> 

> 

> > Hi Krister

> >

> > I guess you have been following this thread and know what I am trying 

to

> do

> >

> > Does that mean I can run it as a cron job and it will automatically 

post

> > without the need for me to open a browser window physicaly myself?

> >

> >

> >

> > > Hi Mel

> > >

> > > You can use the very same 'onload' with php.

> > >

> > > Krister

> > >

> > > ----- Original Message -----

> > > From: "Mel Guiver" <sales@w...>

> > > To: "beginning php" <beginning_php@p...>

> > > Sent: Sunday, February 10, 2002 8:47 PM

> > > Subject: [beginning_php] Newbie needs help - getting form to post

> > > automatically via a cron job

> > >

> > >

> > > > How can I get a PHP form to post from my server (not my PC)

> > automatically?

> > > > using a cron job

> > > >

> > > > When you load a form from your browser you can include in the HTML

> > > > "onload submit" and it will submit the form automatically - how 

can I

> > get

> > > > the same effect with a php form with preset information so that I 

can

> > run

> > > > it as a cron job on a regular daily basis

> > > >

> > > > Any help would be most appreciated

> > > >

> > > > Thanks Mel




> > > $subst('Email.Unsub').

> > > >

> > >

> >




> $subst('Email.Unsub').

> 

Message #12 by "Krister" <krister@m...> on Mon, 11 Feb 2002 20:59:17 +0100
Hi Mel



You can make a timer to do things at the time you want, but you need to keep

your browser runnig.

Her is a code wich is refreshing the page every 5 secs, and you can easely

change its interval by changeing the content value.



<html>

<head>

<title></title>

<meta Http-equiv="Refresh" Content="5; Url=<?php echo $PHP_SELF; ?>">

</head>

<body>

</body>

</html>



Now you need to add a php to do what you want when the time is correct. I

suppose this would work. Is this answering your question? If you want me to

make the php I will need the form wich you want to lounch and the times when

you want them to be lounched.



Krister



----- Original Message -----

From: "Mel Guiver" <sales@w...>

To: "beginning php" <beginning_php@p...>

Sent: Monday, February 11, 2002 6:21 PM

Subject: [beginning_php] Re: Newbie needs help - getting form to post

automatically via a cron job





> Hello Krister

>

> A cron Job is a job that you can set up on your server to run

automatically

> at a pre-determined timed, once a month, or once a day or even every hour

>

> So if you have a message board you can clear the board down to zero

> messages each day using an archive program the cron will run this at the

> time you request it to - much like the scheduler on windows

>

> What I want to do is run another job that automatically post a message to

> my board at lets say 2 in the morning saying the board has been reset,etc

>

> The question is how do we get a form to post automatically without any

> human intervention - as I do not really want to be sitting up at 2 in the

> morning everday

>

> We know how to do it if you call it from a browser window you can use '

> onload. submit, etc' but how do you do it from a server?

>

> There must be someone out there that can answer this?

>

> Compared to some other questions that I have seen on various forums, this

> seems like a walk in the park - the only problem is I just don't know how

> to do it - and its driving nutty

>

> Mel

>

>

> > Hi Mel

> >

> > I don't know what 'cron job' is, but all you can do with html/javascript

> can

> > be done also with php. This means that you can add those things just as

> > before. You can write them in your php-script or break your script and

> add

> > them as always. Php is only one thing more and it does not limit your

> use of

> > html or javascript.

> >

> > Krister

> > ----- Original Message -----

> > From: "Mel Guiver" <sales@w...>

> > To: "beginning php" <beginning_php@p...>

> > Sent: Monday, February 11, 2002 9:07 AM

> > Subject: [beginning_php] Re: Newbie needs help - getting form to post

> > automatically via a cron job

> >

> >

> > > Hi Krister

> > >

> > > I guess you have been following this thread and know what I am trying

> to

> > do

> > >

> > > Does that mean I can run it as a cron job and it will automatically

> post

> > > without the need for me to open a browser window physicaly myself?

> > >

> > >

> > >

> > > > Hi Mel

> > > >

> > > > You can use the very same 'onload' with php.

> > > >

> > > > Krister

> > > >

> > > > ----- Original Message -----

> > > > From: "Mel Guiver" <sales@w...>

> > > > To: "beginning php" <beginning_php@p...>

> > > > Sent: Sunday, February 10, 2002 8:47 PM

> > > > Subject: [beginning_php] Newbie needs help - getting form to post

> > > > automatically via a cron job

> > > >

> > > >

> > > > > How can I get a PHP form to post from my server (not my PC)

> > > automatically?

> > > > > using a cron job

> > > > >

> > > > > When you load a form from your browser you can include in the HTML

> > > > > "onload submit" and it will submit the form automatically - how

> can I

> > > get

> > > > > the same effect with a php form with preset information so that I

> can

> > > run

> > > > > it as a cron job on a regular daily basis

> > > > >

> > > > > Any help would be most appreciated

> > > > >

> > > > > Thanks Mel




> > > > $subst('Email.Unsub').

> > > > >

> > > >

> > >




> > $subst('Email.Unsub').

> >

>




$subst('Email.Unsub').



Message #13 by "Mel Guiver" <sales@w...> on Mon, 11 Feb 2002 21:12:12
Hi Krister,



Yes that would work, but as you say it would need to have the browser 

open, which is why I want to run it as a cron job, that way it will run on 

my server without the need for any human intervention



A cron job I can set up - but  need to find out how to get the form to 

post automatically



I have tried posting this problem on several perl/cgi forums as well, and 

anybody with a good grounding in perl/cgi would be able to answer it, but 

as yet I have not had any replies 





All very frustrating



I will keep searching, thanks for your advice and kind offer and I may 

well come back to you on it





> Hi Mel

> 

> You can make a timer to do things at the time you want, but you need to 

keep

> your browser runnig.

> Her is a code wich is refreshing the page every 5 secs, and you can 

easely

> change its interval by changeing the content value.

> 

> <html>

> <head>

> <title></title>

> <meta Http-equiv="Refresh" Content="5; Url=<?php echo $PHP_SELF; ?>">

> </head>

> <body>

> </body>

> </html>

> 

> Now you need to add a php to do what you want when the time is correct. I

> suppose this would work. Is this answering your question? If you want me 

to

> make the php I will need the form wich you want to lounch and the times 

when

> you want them to be lounched.

> 

> Krister

> 

> ----- Original Message -----

> From: "Mel Guiver" <sales@w...>

> To: "beginning php" <beginning_php@p...>

> Sent: Monday, February 11, 2002 6:21 PM

> Subject: [beginning_php] Re: Newbie needs help - getting form to post

> automatically via a cron job

> 

> 

> > Hello Krister

> >

> > A cron Job is a job that you can set up on your server to run

> automatically

> > at a pre-determined timed, once a month, or once a day or even every 

hour

> >

> > So if you have a message board you can clear the board down to zero

> > messages each day using an archive program the cron will run this at 

the

> > time you request it to - much like the scheduler on windows

> >

> > What I want to do is run another job that automatically post a message 

to

> > my board at lets say 2 in the morning saying the board has been 

reset,etc

> >

> > The question is how do we get a form to post automatically without any

> > human intervention - as I do not really want to be sitting up at 2 in 

the

> > morning everday

> >

> > We know how to do it if you call it from a browser window you can use '

> > onload. submit, etc' but how do you do it from a server?

> >

> > There must be someone out there that can answer this?

> >

> > Compared to some other questions that I have seen on various forums, 

this

> > seems like a walk in the park - the only problem is I just don't know 

how

> > to do it - and its driving nutty

> >

> > Mel

> >

> >

> > > Hi Mel

> > >

> > > I don't know what 'cron job' is, but all you can do with 

html/javascript

> > can

> > > be done also with php. This means that you can add those things just 

as

> > > before. You can write them in your php-script or break your script 

and

> > add

> > > them as always. Php is only one thing more and it does not limit your

> > use of

> > > html or javascript.

> > >

> > > Krister

> > > ----- Original Message -----

> > > From: "Mel Guiver" <sales@w...>

> > > To: "beginning php" <beginning_php@p...>

> > > Sent: Monday, February 11, 2002 9:07 AM

> > > Subject: [beginning_php] Re: Newbie needs help - getting form to post

> > > automatically via a cron job

> > >

> > >

> > > > Hi Krister

> > > >

> > > > I guess you have been following this thread and know what I am 

trying

> > to

> > > do

> > > >

> > > > Does that mean I can run it as a cron job and it will automatically

> > post

> > > > without the need for me to open a browser window physicaly myself?

> > > >

> > > >

> > > >

> > > > > Hi Mel

> > > > >

> > > > > You can use the very same 'onload' with php.

> > > > >

> > > > > Krister

> > > > >

> > > > > ----- Original Message -----

> > > > > From: "Mel Guiver" <sales@w...>

> > > > > To: "beginning php" <beginning_php@p...>

> > > > > Sent: Sunday, February 10, 2002 8:47 PM

> > > > > Subject: [beginning_php] Newbie needs help - getting form to post

> > > > > automatically via a cron job

> > > > >

> > > > >

> > > > > > How can I get a PHP form to post from my server (not my PC)

> > > > automatically?

> > > > > > using a cron job

> > > > > >

> > > > > > When you load a form from your browser you can include in the 

HTML

> > > > > > "onload submit" and it will submit the form automatically - how

> > can I

> > > > get

> > > > > > the same effect with a php form with preset information so 

that I

> > can

> > > > run

> > > > > > it as a cron job on a regular daily basis

> > > > > >

> > > > > > Any help would be most appreciated

> > > > > >

> > > > > > Thanks Mel




> > > > > $subst('Email.Unsub').

> > > > > >

> > > > >

> > > >




> > > $subst('Email.Unsub').

> > >

> >




> $subst('Email.Unsub').

> 

Message #14 by "Krister" <krister@m...> on Mon, 11 Feb 2002 22:29:17 +0100
Hi Mel, you are welcome



Maybe you should ask from someone who is working with a server. A webmaster

or something like that. As you have found out my interest is in programming

and webdesign and not so much in servers. I suppose there must be some kind

of timers or schedulers to do things at the wanted timestamp.



Krister



----- Original Message -----

From: "Mel Guiver" <sales@w...>

To: "beginning php" <beginning_php@p...>

Sent: Monday, February 11, 2002 9:12 PM

Subject: [beginning_php] Re: Newbie needs help - getting form to post

automatically via a cron job





> Hi Krister,

>

> Yes that would work, but as you say it would need to have the browser

> open, which is why I want to run it as a cron job, that way it will run on

> my server without the need for any human intervention

>

> A cron job I can set up - but  need to find out how to get the form to

> post automatically

>

> I have tried posting this problem on several perl/cgi forums as well, and

> anybody with a good grounding in perl/cgi would be able to answer it, but

> as yet I have not had any replies

>

>

> All very frustrating

>

> I will keep searching, thanks for your advice and kind offer and I may

> well come back to you on it

>

>

> > Hi Mel

> >

> > You can make a timer to do things at the time you want, but you need to

> keep

> > your browser runnig.

> > Her is a code wich is refreshing the page every 5 secs, and you can

> easely

> > change its interval by changeing the content value.

> >

> > <html>

> > <head>

> > <title></title>

> > <meta Http-equiv="Refresh" Content="5; Url=<?php echo $PHP_SELF; ?>">

> > </head>

> > <body>

> > </body>

> > </html>

> >

> > Now you need to add a php to do what you want when the time is correct.

I

> > suppose this would work. Is this answering your question? If you want me

> to

> > make the php I will need the form wich you want to lounch and the times

> when

> > you want them to be lounched.

> >

> > Krister

> >

> > ----- Original Message -----

> > From: "Mel Guiver" <sales@w...>

> > To: "beginning php" <beginning_php@p...>

> > Sent: Monday, February 11, 2002 6:21 PM

> > Subject: [beginning_php] Re: Newbie needs help - getting form to post

> > automatically via a cron job

> >

> >

> > > Hello Krister

> > >

> > > A cron Job is a job that you can set up on your server to run

> > automatically

> > > at a pre-determined timed, once a month, or once a day or even every

> hour

> > >

> > > So if you have a message board you can clear the board down to zero

> > > messages each day using an archive program the cron will run this at

> the

> > > time you request it to - much like the scheduler on windows

> > >

> > > What I want to do is run another job that automatically post a message

> to

> > > my board at lets say 2 in the morning saying the board has been

> reset,etc

> > >

> > > The question is how do we get a form to post automatically without any

> > > human intervention - as I do not really want to be sitting up at 2 in

> the

> > > morning everday

> > >

> > > We know how to do it if you call it from a browser window you can use

'

> > > onload. submit, etc' but how do you do it from a server?

> > >

> > > There must be someone out there that can answer this?

> > >

> > > Compared to some other questions that I have seen on various forums,

> this

> > > seems like a walk in the park - the only problem is I just don't know

> how

> > > to do it - and its driving nutty

> > >

> > > Mel

> > >

> > >

> > > > Hi Mel

> > > >

> > > > I don't know what 'cron job' is, but all you can do with

> html/javascript

> > > can

> > > > be done also with php. This means that you can add those things just

> as

> > > > before. You can write them in your php-script or break your script

> and

> > > add

> > > > them as always. Php is only one thing more and it does not limit

your

> > > use of

> > > > html or javascript.

> > > >

> > > > Krister

> > > > ----- Original Message -----

> > > > From: "Mel Guiver" <sales@w...>

> > > > To: "beginning php" <beginning_php@p...>

> > > > Sent: Monday, February 11, 2002 9:07 AM

> > > > Subject: [beginning_php] Re: Newbie needs help - getting form to

post

> > > > automatically via a cron job

> > > >

> > > >

> > > > > Hi Krister

> > > > >

> > > > > I guess you have been following this thread and know what I am

> trying

> > > to

> > > > do

> > > > >

> > > > > Does that mean I can run it as a cron job and it will

automatically

> > > post

> > > > > without the need for me to open a browser window physicaly myself?

> > > > >

> > > > >

> > > > >

> > > > > > Hi Mel

> > > > > >

> > > > > > You can use the very same 'onload' with php.

> > > > > >

> > > > > > Krister

> > > > > >

> > > > > > ----- Original Message -----

> > > > > > From: "Mel Guiver" <sales@w...>

> > > > > > To: "beginning php" <beginning_php@p...>

> > > > > > Sent: Sunday, February 10, 2002 8:47 PM

> > > > > > Subject: [beginning_php] Newbie needs help - getting form to

post

> > > > > > automatically via a cron job

> > > > > >

> > > > > >

> > > > > > > How can I get a PHP form to post from my server (not my PC)

> > > > > automatically?

> > > > > > > using a cron job

> > > > > > >

> > > > > > > When you load a form from your browser you can include in the

> HTML

> > > > > > > "onload submit" and it will submit the form automatically -

how

> > > can I

> > > > > get

> > > > > > > the same effect with a php form with preset information so

> that I

> > > can

> > > > > run

> > > > > > > it as a cron job on a regular daily basis

> > > > > > >

> > > > > > > Any help would be most appreciated

> > > > > > >

> > > > > > > Thanks Mel




> > > > > > $subst('Email.Unsub').

> > > > > > >

> > > > > >

> > > > >




> > > > $subst('Email.Unsub').

> > > >

> > >




> > $subst('Email.Unsub').

> >

>




$subst('Email.Unsub').




  Return to Index