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 Like 41 Dislike
Previous forums Next forums
Other forums

SQl num_rows problem
when i try to count rows from an SQL select i get an warning

Code: [Select]$countviews = mysq

RSS feed - FeedList for WordPress
Hi,

I'm trying to alter the FeedList plugin for WordPress so that I can click on the title of

Email Form Syntax Issue
I need the TO: in email to display To: CEO instead of To: abc@mail.com

How to alter the scri

Mail functionality from localhost to server
Hi

I am facing problem of mail functionality.

When i tested mail functionality in my

Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th

mysql select with $_get ?
Hi, i have this code:
Code: // If char id is 0 and character dont exist do:
if ($_GET["id

PHP loop
Okay so I have several "articles" stored in a mysql database and am attempting to echo tho

Collecting AOL Search Terms
I am attempting to collect AOL search terms. I know the code is correct (it works for google, bing,

SHOW TABLES Help
Hi all

I have the following

Code: [Select]<?php
$sql = "SHOW TABLES&quo

Dynamic Array using glob?
Is there an easier way to do this?

I am trying to get create a dyamic array based on files wi

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