Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.