Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-05-2023, 04:36 AM   #1
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
How can URL be blocked even before loading?

Some CPA networks are blocking access to URL if you dont have right GEO, but URL is not loading at all, meaning you click go and nothing happens. If you would for example, block geo on firewall level, then URL would be throw timeout error after some time. Or if you would put geo block on PHP level you could throw an 403 error. I guess this must javascript thing, but i find it silly to block on pre-load instead redirecting incorrect traffic to somewhere else.
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 05:02 AM   #2
redwhiteandblue
Bollocks
 
redwhiteandblue's Avatar
 
Industry Role:
Join Date: Jun 2007
Location: Bollocks
Posts: 2,792
What headers are being received?
redwhiteandblue is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 05:08 AM   #3
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by redwhiteandblue View Post
What headers are being received?
First normal 302 and then this:
GET: HTTP/2.0 204 No Content
server: nginx
date: Wed, 05 Apr 2023 12:06:44 GMT
accept-ch: Sec-Ch-Ua-Platform-Version
vary: Origin
x-eflow-request-id: 25d25269-4bc8-4472-bb89-c94cb7049112
via: 1.1 google
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
X-Firefox-Spdy: h2
---------------------
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 05:17 AM   #4
redwhiteandblue
Bollocks
 
redwhiteandblue's Avatar
 
Industry Role:
Join Date: Jun 2007
Location: Bollocks
Posts: 2,792
So I guess if the server sends the 204 code then the browser just does nothing when it sees it and that's why nothing happens but it's not considered an error.
redwhiteandblue is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 05:18 AM   #5
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by redwhiteandblue View Post
So I guess if the server sends the 204 code then the browser just does nothing when it sees it and that's why nothing happens but it's not considered an error.
Yeah, kind a self-explanatory But i am just used to see either redirect or error message so find it to be weird policy.
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 07:29 AM   #6
Kittens
👏 REVOLUTIONARY 👏
 
Kittens's Avatar
 
Industry Role:
Join Date: Jan 2016
Posts: 1,440
Quote:
Originally Posted by Klen View Post
Yeah, kind a self-explanatory But i am just used to see either redirect or error message so find it to be weird policy.
204 is to tell the browser that the request was successful but no content is sent back so no need to parse the body... Usually used in API's and non-GET methods... What URL are you trying hit that gives you that?
__________________
Kittens is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 10:19 AM   #7
ladida
Confirmed User
 
ladida's Avatar
 
Join Date: Nov 2005
Posts: 2,166
Lol this guy knows nothing about how internet works
Javascript )))))
__________________
agentGFY *at* gmail.com
ladida is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 10:19 AM   #8
brassmonkey
Pay It Forward
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 76,900
they don't waste time anymore. they just turn off the lights. someone i know was talking about that early this morning
__________________
TRUMP 2025 KEKAW!!! - Support The Laken Riley Act!!!
END DACA - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 10:29 AM   #9
fuzebox
making it rain
 
fuzebox's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,004
There's a lot of reasons why a network or offer would just drop the clicks. Could be a liability of showing content in certain geos, could be for privacy, could be an over zealous fraud protection.

Most companies do not want to redirect other geos to a competitor for whatever reason either. 99% of affiliates that make sales aren't just sending unfiltered untargeted traffic so it should not be a big deal in most cases.
fuzebox is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 11:46 AM   #10
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by Kittens View Post
204 is to tell the browser that the request was successful but no content is sent back so no need to parse the body... Usually used in API's and non-GET methods... What URL are you trying hit that gives you that?
It's a CPA network offer which allows only US traffic. But anyway, i figured out how it's done in PHP:

PHP Code:
<?php
ob_start
();

header("HTTP/1.1 204 NO CONTENT");

header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0"); // Proxies.

ob_end_flush(); //now the headers are sent



?>
Produces same effect.
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 11:50 AM   #11
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by ladida View Post
Lol this guy knows nothing about how internet works
Javascript )))))
I actually know better then how internet works then most of people, but in order to proper debug you need to start with silly questions in order to rule out invalid things.My first guess was javascript because nothing happens in browser, like i did not clicked go at all, and i associate javascript with browser manipulation. And i never seen this 204 status code in action before, only 401,403,404,500,301 and 302.
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 12:29 PM   #12
Kittens
👏 REVOLUTIONARY 👏
 
Kittens's Avatar
 
Industry Role:
Join Date: Jan 2016
Posts: 1,440
Quote:
Originally Posted by Klen View Post
It's a CPA network offer which allows only US traffic. But anyway, i figured out how it's done in PHP:

PHP Code:
<?php
ob_start
();

header("HTTP/1.1 204 NO CONTENT");

header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
header("Pragma: no-cache"); // HTTP 1.0.
header("Expires: 0"); // Proxies.

ob_end_flush(); //now the headers are sent



?>
Produces same effect.
Been almost a decade since I wrote PHP, but AFAIK this should suffice.

PHP Code:
<?php
http_response_code
(204);
?>
__________________
Kittens is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 12:48 PM   #13
Klen
 
Klen's Avatar
 
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
Quote:
Originally Posted by Kittens View Post
Been almost a decade since I wrote PHP, but AFAIK this should suffice.

PHP Code:
<?php
http_response_code
(204);
?>
Nice, love it when i can shorten code.
Klen is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 01:27 PM   #14
brassmonkey
Pay It Forward
 
brassmonkey's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 76,900
ahhh you are trying to duplicate it? the code place would have given you good answers.
__________________
TRUMP 2025 KEKAW!!! - Support The Laken Riley Act!!!
END DACA - SUPPORT AZ HCR 2060 52R - email: brassballz-at-techie.com
brassmonkey is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2023, 02:00 PM   #15
pornmasta
Too lazy to set a custom title
 
pornmasta's Avatar
 
Join Date: Jun 2006
Posts: 18,942
Htaccess ?
pornmasta is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
url, geo, block, loading, throw, error, level, timeout, time, php, javascript, redirecting, incorrect, traffic, pre-load, silly, guess, access, blocking, networks, blocked, cpa, firewall, meaning, click



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.