Server IP : 51.89.169.208 / Your IP : 3.148.107.92 Web Server : Apache System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64 User : yellowleaf ( 1019) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/yellowleaf/public_html/all_scripts/ |
Upload File : |
<?php header('Content-Type: text/html; charset=utf-8'); ini_set('max_execution_time', 300); $path = $_SERVER['DOCUMENT_ROOT']; include_once $path.'/connect_db.php'; $res_listing_query = $connect->query("SELECT * FROM `ads` WHERE `junk`=0 ORDER BY `adid` ASC LIMIT 500"); // $res_listing_query = $connect->query("SELECT * FROM `ads` WHERE `adid`=53164"); // $res_listing_query = $connect->query("UPDATE `ads` SET `junk`=0"); // echo "junk"; // die(); if($res_listing_query->num_rows > 0){ echo '<pre>'; while($row_listing = $res_listing_query->fetch_array(MYSQLI_ASSOC)){ $adid = $row_listing['adid']; $description = $row_listing['description']; $description = utf8_encode(addslashes($description)); // echo $description; // die(); echo "<b>adid: </b> {$adid} - [updated]"; // replace </ br> or </BR> to dot (.) // $sentence_arr = preg_replace("/\<br \/\>/", " . ", $description); // $sentence_arr = preg_replace("/<\/br>|<br\s?\/>/i", " . ", $description); $connect->query("UPDATE `ads` SET `description`='{$description}', `junk`=1 WHERE `adid`='{$adid}'") || die('Update error: '.$connect->error); echo '<meta http-equiv="refresh" content="3">'; } } else{ echo "All completed"; }