| ryannaddy.com | Not Yet Verified |
| phpsnips.com | Not Yet Verified |
| tzfiles.com | Not Yet Verified |
| hostbox.us | Not Yet Verified |
| dudeel.com | Not Yet Verified |
| envne.com | Not Yet Verified |
| nebala.com | Not Yet Verified |
| umok.us | Not Yet Verified |
| gmserver.net | Not Yet Verified |
<?php
function ordinal($cdnl){
$test_c = abs($cdnl) % 10;
$ext = ((abs($cdnl) %100 < 21 && abs(: 'rd' : 'th'));
return $cdnl.$ext;
}
for($i=1;$i<100;$i++){
echo ordinal($i).'<br>';
}
?><?php
// Font directory + font name
$font = 'fonts/Disney.ttf';
// Total number of lines
$linem.php">Try Again</a><br>';
}
?>
[url=http://phpsnips.com/examples/CAPTCHA/form2.php]Example[/url]<?php
function birthday($birthday){
$age = strtotime($birthday);
if($age === false){
return(int)($m2.$d2) < (int)($m1.$d1))
$age -= 1;
return $age;
}
echo birthday('1986-07-22');
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhate("g:i:s");
if($AntePost == "AM"){
echo 'Good Morning!';
}else{
echo 'Good Evening!';
}
?><?php
function page_rank($page, $type = 'alexa'){
switch($type){
case 'alexa':
$url = 'htt);
echo '<br>';
// Google Page Rank
echo 'Google Rank: '.page_rank('phpsnips.com', 'google');
?><?php
$state_list = array(
'AL'=>"Alabama",
'AK'=>"Alaska",
'AZ'=>"Arizona",
'AR'=>"Ark",
'WA'=>"Washington",
'WV'=>"West Virginia",
'WI'=>"Wisconsin",
'WY'=>"Wyoming"
);<?php
function listdir($dir){
if ($handle = opendir($dir)){
$output = array();
while (falsealse;
}
}
$dirs = listdir('myDirectory');
foreach($dirs as $dir){
echo $dir.'<br>';
}
?><html>
<head>
<title>Ascii</title>
<style>
#CAPTCHA{
font-size:1px;
line-height:1px;
}
</s'] = $string;
?>
<p>
Image String: <?php echo $_SESSION['CAPTCHA']; ?>
</p>
</body>
</html><?php
// Calculate RGB Colors of a pixel:
// Returns an object ($obj->red, $obj->green, $obj->blueage:
$img = autoColor("wallpaper.jpg");
header("content-type: image/jpeg");
imagepng($img, null);<?php
function blacklist($ip){
$listed = true;
$dnsbl_lookup = array(
"dnsbl-1.uceprotect.neif(blacklist($_SERVER["REMOTE_ADDR"])){
die("Your on the blacklist!");
}
// Continue with page<?php
function text2bbc($text){
$find = array(
'~\[b\](.*?)\[/b\]~s',
'~\[i\](.*?)\[/i\]~s'have [u]underlined[/u] text');
echo'<br>';
echo text2bbc('this is [size=24]24px[/size] font');
?><?php
header("Cache-Control: private, max-age=10800, pre-check=10800");
header("Pragma: private");se "png":
$mime = "image/png";
break;
}
header("content-type: $mime");
readfile($path);
?><?php
class CacheLayer{
protected $root = "";
protected $cache = "";
protected $key = "";$id = $row["id"];
$title = $row["title"];
echo "<a href='/$id/$title'>$title</a><br />";
}<?php
// This will return a number of how many more characters the longest string has
function str$len2);
}
echo str_compare_length("This is the first string", "This is the second string");
?><?php
// Function works on Both HTML, and XHTML
function is_html($str,$count = FALSE){
$html = aecho 'This contains HTML<br />';
echo $a[1];
}else{
echo 'This doesn\'t contain HTML';
}
?><?php
function loggedIn(){
//Session logged is set if the user is logged in
//set it on 1 ifaving
//to re-write the form everytime, just use this function
logedIn();
?>
</body>
</html><?php
function is_prime($num){
for($i=$num;$i > 0;$i--){
$v = $num / $i;
if(!is_float($v)){;$i++){
if(is_prime($i))
echo $i.' is prime<br>';
else
echo $i.' is not prime<br>';
}
?>[url=http://phpsnips.com/examples/stopwords.txt]Stop Words File[/url]<?php
function commonWords($stprint_r(commonWords($str, null));
echo '<br>';
echo '<br>';
print_r(commonWords($str, 10));
?><?php
if(basename(__FILE__) == basename($_SERVER['PHP_SELF'])) send_404();
$dbHost = "localhost";hp
# just add this line of php code (without the pound sign):
# include"db.php";
# once
?>stringtoURL ( string $string [, bool $set] )
$string = the string to be converted to $_GET variarray
$s = 'http://tzfiles.com/?name=bob&str=hello&q=awesome';
print_r(stringtoURL($s,false));
?><?php
function createThumbnail($imageDirectory, $imageName, $thumbDirectory, $thumbWidth, $quality)/to/store/thumb", 120, 80);
//120 = thumb width :: 80 = thumb quality (1-100)
}
}
?><?php
function initials($name){
$nword = explode(" ",$name);
foreach($nword as $letter){
$new_name .= $letter{0}.'.';
}
return strtoupper($new_name);
}
echo initials('John Doe');
?><?php
include 'incl/db.php'; // Include the database
// Set the page, use one if the get page_fetch_array($sql);
echo '<h1>'.$row['name'].'</h1>';
echo '<div>'.$row['code'].'</div>';
}
?><?php
// Function to test for time overlap
// $start_time A start date YYYY-MM-DD HH:MM:SS
//[]["end"] = "2012-04-01 00:00:00";
}else{
echo "Overlap found time not added to array!<br />";
}<?php
$variable = 'Hello Kitty!';
if($variable == 'Kitty'){
echo 'Goodbye Kitty.';
}else{ve');
foreach($variable as $key => $var){
echo '<p>KEY: '.$key.', VALUE: '.$var.'</p>';
}
?><!-- These files must exist to work (This is only an example) -->
<form action="process.php" meth/",$delete);
}else{
continue;
}
}
# Return to form.html
header("Location: form.html");
?><?php
function getHoliday($day){
$year_explode=explode("-",$day);
$year = $ano_expi" => date("Y-m-d",mktime (0, 0, 0, $diames , $diapascoa+60, $Y)) );
return $array;
}
?><?php
function file_size($url){
$size = filesize($url);
if($size >= 1073741824){
$fileSize =$fileSize = $size . ' bytes';
}
return $fileSize;
}
echo file_size('/myfile/image.jpg');
?>This text file contains all the dates you want to display a particular
URL, directory, directory toreturn $def[1];
}
}
$url = imagedate();
echo '<a href="'.$url.'">'.$url.'</a>';
?><?php
// This is for Central Standard Time
ini_set('date.timezone','America/Chicago');
echo '<p>':i A").'</p>';
?>
[url=http://us3.php.net/manual/en/timezones.php]More Time Zone Locations[/url]<?php
function lat_long_dist($lat1, $long1, $lat2, $long2){
$pi = pi();
$x = sin($lat1 *(($x/$pi) * 180)) / 1.609344);
}
echo lat_long_dist(56.34342, 49.324523, 57.49544, 47.421524);<?php
function stringDomain($string){
$d = explode('/',$string);
return str_replace('www.','',$d[2]);
}
$URL = 'http://php.net/round';
echo stringDomain($URL); // prints: php.net
?><?php
set_time_limit(0);
// Supports all file types
// URL Here:
$url = 'http://somsite.com/some(true)).'.'.$ext;
$handle = fopen($saveFile, 'wb');
fwrite($handle, $opt);
fclose($handle);
?><?php
//Array contents array 1 :: value
$myArray1 = array('Cat','Mat','Fat','Hat');
//Array conterray2 as $let=>$word){
echo'<option value="'.$let.'">'.$word.'</option>';
}
echo'</select>';
?>This is more of a tutorial, but in the end you will have a snippet of code.
For this example we wdit the
PHP file!
[code]<link rel="stylesheet" type="text/css" href="themes/default.css">[/code]<a href="links.php?id=1">File 1</a>
<a href="links.php?id=2">File 2</a>
<a href="links.php?id=3"e{
// the id parameter in the url was not set
echo '<p>Invalid URL.</p>';
}
echo '</div>';
?><?php
include 'db.php';
// Set how wide you want your table
$tblWidth = 4;
// Make your query
$+;
}
echo '</tr>';
}else{
echo '<tr><td>No Results Found</td></tr>';
}
echo '</table>';
?><?php
session_start();
$handle = fopen($_POST['original_file_name'], "w");
$text = $_POST['filden" value="<? echo $fileName; ?>" name="original_file_name" />
</form>
<body>
</body>
</html><?php
// Set who this goes to:
$to = array('Billy Bob','billy@bob.com');
// Give the message a supe);
unset($fileatt_name);
// Send the message:
mail($to[1], $subject, $message, $headers);
?><?php
// $html = the html on the page
// $current_url = the full url that the html came frots links from the page and formats them to a full valid url:
print_r(pageLinks($html, $url, true));<?php
function distance($curlen,$type,$totype,$on){
//Check to see if the first value is an interon or off :: 1=on : 2=off
//m = miles
//f = feet
//i = inches
echo distance(123,"m","f",1);
?><?php
$size = mb_strlen('This is a string, what is the file size of it?', 'latin1');
if($size >= 1024)
$size = round($size / 1024, 2).' KB';
else
$size = $size.' bytes';
echo $size;
?><?php
function strinstr($find, $str){
$find = preg_quote($find);
if(preg_match('~'.$find.'~',$sme is billy bob joe.';
if(strinstr('ralph', $sStr))
echo 'found';
else
echo 'not found';
?><?php
$filename = $_GET['file']; //Get the fileid from the URL
// Query the file ID
$query = spelse{
header("Location: /");
exit;
}
?>
<a href="downloadFile.php?file=7383">Download</a><img src="/path/to/img.jpg?h=<?php echo md5(microtime(true)); ?>" /><?php
# This particular code will generate a random string
# that is 25 charicters long 25 comes fand you can then verify that that is the correct email
# or verify what ever you want to verify
?><?php
require_once "database_connections.php";
$uniq = uniqid();
$pass = substr(md5($uniq), 0,]);
mysql_query("insert into members (username, password) values ('$username', md5('$pass'))");
?><?php
//This will get an array of all the gif, jpg and png images in a folder
$img_array = glob("/lay the image on the page
echo '<img alt="'.$img_array[$img].'" src="'.$img_array[$img].'" />';
?>getDirs ( string $directory )
This function will grab grab all directories in a given directory,$opt[] = str_replace($directory,"",$dir);
}
return $opt;
}
print_r(getDirs('../'));
?><?php
$file = '/path/to/file.php';
$info = pathinfo($file);
echo $info['extension'];
?><?php
//$url = "http://share.meebo.com/content/katy_perry/wallpapers/3.jpg";
$url = $_GET['url']ges/phpsnippets.jpg
<img src="displayImg.php?url=http://phpsnips.com/images/phpsnippets.jpg" /><?php
// Insert into database
mysql_query("INSERT INTO my_table (`column1`, `column2`) VALUES ('onincremented number was that was inserted
$id = mysql_insert_id();
// Display it...
echo $id;
?><?php
function toHex($N) {
if ($N==NULL) return "00";
if ($N==0) return "00";
$N=max(0,$N);])
);
}
echo rgb2hex(106,48,48);
echo '<p> </p>';
print_r(hex2rgb("6A3030"));
?><?php
function highlight_html($string, $decode = TRUE){
$tag = '#0000ff';
$att = '#ff0000';
$<form action="/login.php" method="post">
<input type="text" value="User Name" />
</form>
');
?><html>
<head>
<title>Ascii</title>
<style>
body{
line-height:0;
font-size:1px;yle="color:rgba('.$r.','.$g.','.$b.','.$a.');">#</span>';
}
}
}
?>
</body>
</html><?php
// Location to upload main image:
$mainDir = $_SERVER['DOCUMENT_ROOT'].'/images/l/';
// Locas $img){
echo ' <img src="'.str_replace($_SERVER['DOCUMENT_ROOT'], '',$img).'" /> ';
}
}
?><?php
function is_multiple($num, $mult){
if($num % $mult == 0)
return true;
else
retp(is_multiple(200, 100));
var_dump(is_multiple(110, 100));
var_dump(is_multiple(1000, 100));
?><?php
function is_stopword($word){
$words = array("a's","able","about","above","according","accorawled", "up", "the", "wall");
foreach($test_words as $word){
var_dump(is_stopword($word));
}
?><html>
<head>
<title>Ascii</title>
<style>
body{
line-height:1px;
font-siztyle="color:rgb('.$r.','.$g.','.$b.');">#</span>';
}
}
}
?>
</body>
</html><?php
function key_implode($glue, $array){
$keys = array_keys($array);
return implode($glue, $keys);
}
$arr = array("cats" => 4, "dogs" => 8, "fish" =>10);
echo key_implode(",", $arr);
?><?php
// include the database
include 'db.php';
$query = 'INSERT INTO `table_name` (`ownerID`,ing comma at the end.
$query = trim($query,',');
// Perform the query
mysql_query($query);
?>This takes 3 functions to complete the inactive session task.
1. We need to check if the persongged in
$_SESSION['sessionX'] = $ctime;
}
}
}
# Run Session logout check
sessionX();
?><?php
for($i= 'a'; $i <'zzzzz'; $i++) echo $i."\n";
?>This script requries 2 functions
1. The function to run maintenance mode
2. The function to gettion filename($url){
$pos = strrpos($url,'/');
$str = substr($url,$pos+1);
return $str;
}
?><?php
########################################################################################
#n,$dir_under_destination,$file_type);
// End and Close Log File ... All Done
ob_end_flush();
?>The function mmmr (Mean, Median, Mode, Range) will calculate the Mean, Median, Mode, or Range of aifference between the highest number and the lowest number
echo 'Range: '.mmmr($arr, 'range');
?><?php
//if a string is longer than the defined length,
//it will add 3 periods to the end of thehe second part is how long it can be
echo strLength($str,10).'<br>';
echo strLength($str,30);
?><?php
/*
* __Construct() $movieLocation: The complete file location of the movie to conver</p>
<p>
<input type="submit" name="submit" value="Upload" />
</p>
</form><?php
function styleSheet($currentCookie){
# Get Current Style Sheet
$currentCookie = $_COOKIe=3">Style Sheet 3</a><br />
<a href="saveStyleSheet.php">Default Style Sheet</a>
</body>
</html><?php
include 'file/for/database/connection.php';
function displayTable($query = ""){
$table = 'playTable("SELECT username, email FROM users"); // displays only username and email in the table
?><?php
/*
Methods:
connect
Connectects to a mysql or sphinx database
query
queriesser, email) values ('$user', '$email')");
$insert_id = $db->insertID();
echo "$insert_id\n";
?>Database Name: active_sessions
ip session date
+--------+--------num_rows($sessions);
}
# Print the final result
echo'<b>Online Now: </b>'.$active_sessions;
?>Using this script, you need to know some rules.
1. You can only use /**/ to make comments // willi-colons are required otherwise you WILL get an error */
msg('adding some numbers');
add(23, 340);<?php
/**
*
* @param String $string
* @return float
*
* Returns a float between 0 and 1"<br>";
var_dump(password_strength("abc123"));
echo "<br>";
var_dump(password_strength("sweet"));<?php
//Get all the images in the database (use a WHERE clause to limit what it finds)
$sql = my="url/to/thumb/image/'.$row['img_file_name'].'" />
</a>
</p>';
//Add one to $i
$i++;
}
?><form action="show.php" method="post">
Enter Your Name: <input type="text" name="myName"><br>t method from a form
// myName is the name of the field that we want to retrieve from the form
?><?php
function randColor(){
$letters = "1234567890ABCDEF";
for($i=1;$i<6;$i++){
$pos = r}
return "#".$str;
}
echo '<span style="color:'.randColor().'">Random Color Text</span>';
?><?php
class ClassA{
private $readOnly = 'This is read only';
public function __get($name){
s>readOnly;
// This following line will throw an error
$class->readOnly = 'Trying to change';
?>I should not be able to update this, I didn't post it. Why is this possible?
<?php
define ('DBPAT"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
?>Database Name: referer
ip referer date
+--------+--------td>'.date("m-d-Y, g:i:s",$row['date']).'</td>
</tr>';
}
// Close the table
echo '</table>';
?><?php
/*
$content = text you want to parse
$replacement = what you want to replace the tags withpReplace("<p>I like pizza</p>",";");
echo tagStripReplace("<p>I like pizza</p><p>Do you?</p>");
?><?php
function return_between($string, $start, $stop){
$st = $string;
$list = array();
for($ixt = 'This is a %string%, get text %some% text...';
print_r(return_between($text, '%', '%'));
?><?php
function multiple_round($value, $to){
$opt = $value / $to;
$opt = round($opt,0);
$optns 0
echo multiple_round(49,10); // Returns 50
echo multiple_round(599,10); // Returns 600
?><?php
include 'db.php';
// Change $color1 and Color2 to your preference
$color1 = '#FF0000';
$cod></tr>';
$i++;
}
}else{
echo '<tr><td>No Results Found</td></tr>';
}
echo '</table>';
?><?php
//Create a variable for start time
$time_start = microtime(true);
// Place your PHP/HTML/et seconds
$time = $time_end - $time_start;
echo 'Script took '.$time.' seconds to exicute';
?><?php
function duration($len){
$hr = floor($len / 60 / 60);
$min = floor($len / 60);
$sec = fur);
echo $totals['hr'].' hours, '.$totals['min'].' minutes and '.$totals['sec'].' seconds.';
?><?php
// 7200 = Time in seconds for the cookie to be active
// "/" = Where this cookie can accesquire a Secure Network
session_set_cookie_params(7200,"/",".site.com",FALSE);
session_start();
?><?php
function cut_str($str, $len = 20){
if(strlen($str) > $len){
$string = '';
while($}
return $str;
}
$str = 'hello this is a 20 char at str.';
echo cut_str($str);
?><?php
header("Content-type: image/png");
$string = "abcdefghijklmnopqrstuvwxyz0123456789";
for(rm.php">Try Again</a><br>';
}
?>
[url=http://phpsnips.com/examples/CAPTCHA/form.php]Example[/url]<form action="verify.php" method="post">
User Name:<br>
<input type="text" name="username"><brd']){
header("Location: login_page.php");
exit;
}
echo 'Welcome, '.$_SESSION['username'];
?>The smart_case function will upper case the first letter of all
words, unless you specifically ter;
}
$str = 'This is a string to be uppercased';
echo smart_case($str,'this is a to be');
?><?php
function is_spam($text, $file, $split = ':', $regex = false){
$handle = fopen($file, 'rb');is is spam';
else
echo 'this is not spam';
?>
viagra:3
sex:3
porn:2
boobs:2
law firm:4<?php
function strcomp($str1,$str2){
if($str1 == $str2){
return TRUE;
}else{
return FALSEt string","Second string"); //Returns FALSE
echo strcomp("A string","A string"); //Returns TRUE
?><?php
function dump_opt($string, $return = false){
$find = array("\n", "\0", "\t",s some new lines
in it
it may have a carriage return or two as well.
STR;
dump_opt($string);
?><?php
/*
* __construct($email) takes an email address to check
*
* simpleCheck()o " ";
var_dump($em->simpleCheck());
echo " ";
var_dump($em->strongCheck());
}<?php
function buildTag($tag, $att = array(), $selfColse = FALSE, $inner = ''){
$t = '<'.$tag.' 'er:solid 1px #000'), FALSE, buildTag('a', array('href'=>'http://google.com'), FALSE, 'Google'));
?>FtoC ( int $temp , str $cTo )
temp = the number you wish to convert
cTo = the value you wan<?php
function has_html($string){
if(strlen($string) != strlen(strip_tags($string))){
return ttml("This string doesn't have any html"));
var_dump(has_html("This string has a<br />line break"));This snippet displays text with a line number next to it.
This particular snippet has CSS code toiv>';
}
$code = "This
Is
My
Code:
<?php
echo 'PHP is good';
?>";
lineCount($code);
?><?php
function to_link($string){
return preg_replace("~(http|https|ftp|ftps)://(.*?)(\s|\n|[,.?!]urls: http://phpsnips.com http://yahoo.com and http://google.com';
echo to_link($html, TRUE);
?><?php
function prettyDate($date){
$time = strtotime($date);
$now = time();
$ago = $now - $timecho prettyDate("2012-01-01 01:00:00")."<br />";
echo prettyDate("2001-05-30 00:00:00")."<br />";<?php
// $imageDirectory = the directory of the image with out the trailing slash
// $thumbDirectomage, 0, 0, 0, 0, $thumbWidth, $thumbHeight, $details[0], $details[1]);
imagegif($resized);
}
?><?php
$trueColors = array(
'ANTIQUE WHITE' => '#FAEBD7',
'AQUA' => '#00FFFF',
'AQUAMARINE' => '#> '#FFFFFF',
'WHITE SMOKE' => '#F5F5F5',
'YELLOW' => '#FFFF00',
'YELLOW GREEN' => '#9ACD32');
?><?php
class Twitter{
protected $twitURL = 'http://api.twitter.com/1/';
protected $xml;ge){
echo "<div class='tweet'>".$twitter->formatTweet($message)."<br />At: ".$time."</div>";
}<?php
function tax($total,$tax_amount){
$tax_rate = $tax_amount * .01;
$tax = $total * $tax_ratrice = 50.00; #In U.S. Dollars
$taxrate = 6.5; #In percentage
echo "$".tax($price,$taxrate);
?>It is reccomended that the functions.php file and the file that exicutes the
unzip function are';
if(unzip('zipedfiles/test.zip','unziped/myNewZip'))
echo 'Success!';
else
echo 'Error';
?><?php
session_start();
$vu = array('user1' => 'password1', 'user2' => 'password2');
function doTH_PW']) $b = true;
}
return $b;
}
if(!checkUser()) doAuth();
// The rest of the page
?><?php
if(isset($_POST['submit'])){
# connect to the database here
# search the database tame="re_password" /></p>
<p><input type="submit" name="submit" value="Sign Up" /></p>
</form><?php
if(isset($_POST['email'])){
$email = $_POST['email'];
if(filter_var($email, FILTER_VALI"email" value="<?php echo $_POST['email']; ?>">
<input type="submit" value="Check Email">
</form>isImage ( string $img )
<?php
function isImage($img){
if(!getimagesize($img)){
return FALSE;
}else{
return TRUE;
}
}
?><?php
function watermark($file, $watermark, $pos = null, $x = 0, $y = 0){
$details = getimagesizeused more than one time, the image that will be displayed
// will be the first function called.
?><?php
function censorWords($text){
$find = array(
'/damn/i',
'/shit/i',
'/fuck/i'nd,$replace,$text);
}
$text = 'That Damn cat is fucking stupid.';
echo censorWords($text);
?><?php
function word_count($sentence){
$array = explode(" ", $sentence);
return count($array);
}
$words = word_count("The is a group of words");
echo $words;
?>This text file contains all of the words/phrases that will
be displayed on a certain day. This shou];
}else{
return $array[$date];
}
}
echo '<p> </p><p>'.wordofday().'</p>';
?><select name="year">
<?php
$years = range(date("Y"), date("Y", strtotime("now - 100 years")));
foreach($years as $year){
echo'<option value="'.$year.'">'.$year.'</option>';
}
?>
</select><?php
function zodiac($DOB){
$DOB = date("m-d", strtotime($DOB));
list($month,$day) = explode("zodiac = "Pisces";
}
return $zodiac;
}
echo zodiac('1986-07-22'); //Valid strtotime date
?><?php
function zodiac ( $birthdate )
{
$zodiac = "";
list ( $year, $month, $day ) = ex& $day > 18 ) || ( $month == 3 && $day < 21 ) ) { $zodiac = "Pisces"; }
return $zodiac;
}
?>admin added a new snippet: Strong Email Verification
admin added a new snippet: Password Strength
admin added a new snippet: Movie To ASCII Movie
admin added a new snippet: Distance Between Two Points on the Earth
admin added a new snippet: Blacklist Lookup
admin added a new snippet: Date Range Overlap Check
admin commented on their own snippet: CacheLayer
admin
We use this snippet here on phpsnips! It makes the many of the pages run 10x faster!
8 months ago
admin added a new snippet: CacheLayer
admin
We use this snippet here on phpsnips! It makes the many of the pages run 10x faster!
8 months ago
admin added a new snippet: Test For HTML In A String
admin added a new snippet: Extract URL's from HTML
admin added a new snippet: Is Stop Word
admin added a new snippet: User Authentication
admin added a new snippet: Key Implode
admin commented on their own snippet: Mysql/Sphinx Database Class
admin
Yes, that is how you connect and query a sphinx index
11 months ago
admin commented on their own snippet: Mysql/Sphinx Database Class
admin
You can connect to Sphinx and make queries the same way you can connect to mysql and make queries. The difference is in the last method. Sphinx calculates the total number of found rows differently than Mysql's CALC_FOUND_ROWS.
11 months ago
admin added a new snippet: Mysql/Sphinx Database Class
admin
Yes, that is how you connect and query a sphinx index
11 months ago
bren13240
I just see "mysql_query" for everything, unless that's what it supposed to do...
11 months ago
admin
You can connect to Sphinx and make queries the same way you can connect to mysql and make queries. The difference is in the last method. Sphinx calculates the total number of found rows differently than Mysql's CALC_FOUND_ROWS.
11 months ago
admin commented on DNSBL's snippet: IP Blacklist Check Script
admin
Thanks for the script! I am adding this to the backend of phpsnips, we will see how it goes!
11 months ago
premfreshersite
Thanks for the code, working well in my site!
6 months ago