Solved

Using php & Javascript (Ajax & jQuery) in Cronjobs

Posted on 2011-03-08
4
1,345 Views
Last Modified: 2012-05-11
Hi Experts
I need to run php page using the cronjob on my hosting account
i always do that and is working very well using the command "php5"
but now i need to run a php page which contains some javascript and ajax/jQuery
i can run this page from my browser( Client Side ) and it output and do just what i want but in cronjob it is'nt.

any help will be appreciated.
Thanks.
0
Comment
Question by:mhmr
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 250 total points
ID: 35080116
javascript, jQuery, and AJAX need a browser to run in.  In particular, the basis of AJAX, 'XMLHttpRequest', is a browser function, not even a javascript function.
0
 
LVL 2

Author Comment

by:mhmr
ID: 35083078
ok any way to do this
i have an ssh connection in my hosting package  if this doing any good.
so if that possible using a unix command??

Thanks in advance
0
 
LVL 82

Assisted Solution

by:leakim971
leakim971 earned 250 total points
ID: 35083260
0
 
LVL 2

Author Closing Comment

by:mhmr
ID: 35202547
thanks all for the information provided,
i don't have enouph permession to install those programs.
so i'll try another way to run my script, may be i'll switch to php.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now