Jump to content

Usage of cronteb to submit POST action


jcsarmento

Recommended Posts

Hi,

 

 

 

I have a php file that has a post.

but this post is not manual, it´s through a cronjob, and for me it does not work.

 

in my file named "file_that_sends_post.php" I have:

 

 

<?php

.

.

.

 

$string2=999;

$customer_post_key=555;

$action=$customer_domain."/file_post_receiver.php";

 

 

?>

 

 

<form name=”post” action=<?php echo $action ?> method="post" >

<input type="hidden" name="string" value=<?php echo $string2 ?> >

<input type="hidden" name="origem" value=<?php echo $customer_post_key ?> >

</form>

 

<script language="JavaScript">

document.forms[0].submit();

</script>

 

 

-----------------------

 

And this works perfect if I run it on a browser like firefox!

 

but this does NOT work if I run it on a cron job on the server . The cron Job Im using is:

 

wget  -nd --delete-after '(mydomain)/file_that_sends_post.php' >/dev/null 2>&1

 

(mydomain) is the full adress including http, I did not put here because this editor does not let me because im new on this forum.

 

I think it´s the javascript part...that apache can´t execute.

is it?

 

Can anyone help me on this one?

 

many thanks.

jsarmento

 

Link to comment
https://forums.phpfreaks.com/topic/165734-usage-of-cronteb-to-submit-post-action/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.