View Single Post
Old 04-05-2023, 11:46 AM  
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 offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote