IP Based Cron Jobs
Posted on
16th Feb 2014 07:03 pm by
admin
I run cronjobs on my website. After one of my visitors got curious and tinkered around he realized he could reset my cron jobs...woohoo....
Is there a way to get information from the server to make sure it is who it is?
I have my idea below but I would like to know if there was another more secure way of doing this or if my way is fine. Since I also automaticly updating incoming CPA Leads and Paypal IPN the same way as my cronjobs. Paypal IPN does have to make sure there 'account balance' has money through Database so they can't just go throwing money at themselves..Luckily I had thought of that before the visitor went tinkering.
I basicly figured something like if i ran a cronjob and my server ip was 1.1.1.1 and the cronjob sent to http://site.com/cron.php?id=admin22113 coding would be as followed:
Code: [Select]$id=$_GET["id"];
$ip=@$REMOTE_ADDR;
if ($ip==1.1.1.1){
if ($id="admin22113"){
DoFunctions(CronJobs)
}
}
the $id(admin22113) I put as a secondary security measure. Say my own personal passcode to check if its there to say its me.
Only problem with this is my CPA Company IP changes and doesn't do "passcodes". I have to use Get functions to receive data through server so this is a little harder for a visitor to call. If there are any other possible ways please help me out.
No comments posted yet
Your Answer:
Login to answer
196
41
Other forums
date function help
i need help with date function
Code: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD H
Problem assigning value to variable in "IF" function
Does this script makes sense? I am trying to take the value that is set to "authenticat" a
change text color with a jQuery code
Hihow can I change the text in a asp:TextBox to a different color when I start typing using jQuery?I
if statements problems
Hi. I'm trying to make a web form, but I kind of hit a dead end trying to figure out why it doesn't
Internal class functions don't seem to get executed.
Hi. Can someone please put me out of my misery on this. I don't write much PHP and this has me baffl
Mail from PHP form not always ending up in my inbox?
Hi guys,
I'm a real newbie to PHP and have managed to put together a simple mail form that se
SAP Management Console is blank
Dear All ,
I am facing problem in my des sever suddely in SAP Management Console is blank and
Simple AND question
Hello,
I've got following code:
Code: if(strpos($row[13],"http://")
question about n
I was looking at some of the things you could do with php and one of the things I have tried is n.<
php code generators
All
Whilst enjoying learning a new language i have come accross a number of free code generat