Find Jobs
Hire Freelancers

limit number of click counts per IP every 24 hrs

€8-30 EUR

Closed
Posted almost 4 years ago

€8-30 EUR

Paid on delivery
here is my code for counting user clicks on banner ad, i want to limit the number of click counts only 1 acceptable for user per 1 IP once every 24 hours.? public function adClicked($pub,$hash) { $ad = Advertise::where('hashid', $hash)->first(); if(isset($ad)) { $an['user_id'] = $ad->user_id; $an['publisher_id'] = $pub; $an['type'] = 2; Analytic::create($an); if($ad->click==1) { $user = User::find($ad->user_id); if($user->click > 0) { $user['click'] = $user->click - 1; $user->save(); } else { $ad['status'] = 0; $ad->update(); } $publisher = Publisher::find($pub); if(isset($publisher)) { $gnl = General::first(); $publisher['balance'] = $publisher->balance + $gnl->click; $publisher->update(); } } $ad['count_click'] = $ad->count_click + 1; $ad->update(); return redirect($ad->link); } else { return redirect(url('/')); } }
Project ID: 24832339

About the project

3 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average €23 EUR for this job
User Avatar
Hey, I will write a similar script, you have mentioned in the description. It will check whether the user already clicks an ad in 24 hours if yes then it won't count maybe we can redirect to the dashboard otherwise it will allow the user to click an ad and record that click. Ping me back, so we can discuss it and start asap. Regards, Nabeel Abid
€30 EUR in 1 day
5.0 (41 reviews)
5.9
5.9
User Avatar
Hi, I've checked this code and I can add the limit to restrict user to click once in 24 hours. Discuss with me and I'll complete it in few hours. thanks
€19 EUR in 7 days
4.9 (50 reviews)
5.5
5.5
User Avatar
Hi so you want also time limit also ? now it is done for 1 only please message me for more details i can start right now and finish asap waiting for positive response regards.
€19 EUR in 7 days
5.0 (115 reviews)
5.5
5.5

About the client

Flag of UNITED KINGDOM
Mashhad, United Kingdom
0.0
0
Member since Dec 6, 2014

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.