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?

Did you know?Explore Trending and Topic pages for more stories like this.
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 Like 41 Dislike
Previous forums Next forums
Other forums

same querie, or a new one??
Hi guys,

I'm still working on this drop down list. I've got the actual drop down list to wor

Reading waves
Hi,

I am trying to find a way of finding the highs and lows on a graph line, the line points

Show specific day of the week
I have been racking my brain trying to get this function to work properly and it is doing so for eve

how make 2 column in table with data tybe long row
hi every one

I want make in my table 2 column with data tybe long raw

how thi

Selecting an "empty" date formated field
How do you select an "empty" date field? I've tried the few ways I can think.
SQL> select

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

Linking with Foreign Keys
I have been getting an erro when I try and link:

create table Faculty_Specialty (I_Name v

Bit manipulation program with binary operations
My homework is to create a program to scan in and add binary numbers and print them like so

some query on multilingual website
Hi all,

Which is the simplest and easiest method to make a website multilingual,
is it put

records between 2 dates
Hello all,

I have a date tracked table which contains effective_start_date and effective

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash