Sanitize MySQL Inputs
November 13th, 2009
No comments
fast PHP function to check if youtube video is still valid:
<?php
function checkYoutubeId($id) {
if (!$data = @file_get_contents("http://gdata.youtube.com/feeds/api/videos/".$id)) return false;
if ($data == "Video not found") return false;
return true;
}
function checkYoutube($vid) {
if (strlen($vid) < 12) { return checkYoutubeId($vid); }
$preg1 = '@www.youtube.com\/watch\?v=(.*?)$@';
if ( preg_match($preg1, $vid, ...
In number theory, integer factorization is the breaking down of a composite number into smaller divisors, which when multiplied together equal the original number. By the fundamental theorem of arithmetic, every positive integer number, greater than one has a unique ...
How to remove/Strip HTML tags from php $_POST variable:
foreach ($_POST as $key => $value) {
$_POST[$key] = addslashes(strip_tags($value));
}
foreach ($_GET as $key => $value) {
$_GET[$key] = addslashes(strip_tags($value));
}
strip_tags - tries to return a string with all HTML and PHP tags stripped from a ...
1'st Solution, use Mysql COUNT(*) :
$sql = "SELECT COUNT(*) FROM my_table";
$result = mysql_query($sql);
$num = mysql_result($result, 0);
echo $num;
2'nd solution: use TABLE_ROWS and TABLE_NAME from information_schema:
$query = "select TABLE_ROWS from information_schema.tables where table_schema = 'my_data_base' AND TABLE_NAME = 'my_table' ";
$result = mysql_query($query);
$count ...
Free URL/Link Redirect - Hide the destination URL -
You can hide the destination URL in many ways ...
Try here => http://r.t2i.info/
Cine este curios verifica si o sa'si dea seama cam despre ce este vorba. In princpiu siteul respcetiv nu face ...
Ce mai este nou pe Video Downloader:
Siteuri noi:
CollegeHumor (NEW)
Blastro (NEW)
VideoMix.ro / video.rol.ro (NEW)
PornHub (NEW)
BlipTv (activat pentru ca nu era finalizat codul)
Modificari in cod:
returnarea de formate multiple in mod automat fara alegerea manuala.
YouTube : FLV si MPEG
Daylimotion: Default (MP4, FLV asu ...