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
Looking for help reading a .txt or .ini file and outputting the info.
I have a file called Info.ini and It has the following info:
Code: [General]
Online=0
I wou
Update Database
Hi All,
I have a problem with this:
Code: [Select]<?php
session_start();
Call to undefined function mysql_fetch_accoc()
New to php/mysql coding. What's wrong with this sequence, or am I
just not seeing to obvious?
Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming
Best PHP Documentation generator
Hello guys!
I would like to hear from you what is the best PHP documentation generator. Perso
scandir clients directory
hi,
how can i scandir the clients directory? i need a script that when i click a button it will u
Storing/displaying image urls in a database?
Hi
Basically I have the following scenario:
User chooses picture from list. Picture info is ad
MySql timezone
Code: $sql = "SELECT *, date_format(date, '%m/%d/%Y at %I:%i %p' )as date FROM comments WHERE t
SOAP Issue
Hi,
I am facing some understanding problem with SOAP basic.kindly recommend some SOAP expert.
Header is not working in IE
Hi ! header function is not working in IE but it works in FF, Safari, Chrome. any help please. :