$value ) { $_GET[ $key ] = htmlspecialchars( $value ); } // @see http://bavotasan.com/2011/convert-hex-color-to-rgb-using-php/ function hex2rgb($hex) { $hex = str_replace("#", "", $hex); if(strlen($hex) == 3) { $r = hexdec(substr($hex,0,1).substr($hex,0,1)); $g = hexdec(substr($hex,1,1).substr($hex,1,1)); $b = hexdec(substr($hex,2,1).substr($hex,2,1)); } else { $r = hexdec(substr($hex,0,2)); $g = hexdec(substr($hex,2,2)); $b = hexdec(substr($hex,4,2)); } $rgb = array($r, $g, $b); //return implode(",", $rgb); // returns the rgb values separated by commas return $rgb; // returns an array with the rgb values } $textShadow = ''; if ( $_GET['text-shadow-location'] != 'none' ) { if ( stripos( $_GET['text-shadow-location'], 'left' ) !== false ) { $textShadow .= '-' . $_GET['text-shadow-distance']; } else if ( stripos( $_GET['text-shadow-location'], 'right' ) !== false ) { $textShadow .= $_GET['text-shadow-distance']; } else { $textShadow .= '0'; } $textShadow .= ' '; if ( stripos( $_GET['text-shadow-location'], 'top' ) !== false ) { $textShadow .= '-' . $_GET['text-shadow-distance']; } else if ( stripos( $_GET['text-shadow-location'], 'bottom' ) !== false ) { $textShadow .= $_GET['text-shadow-distance']; } else { $textShadow .= '0'; } $textShadow .= ' '; $textShadow .= $_GET['text-shadow-blur']; $textShadow .= ' '; $rgb = hex2rgb( $_GET['text-shadow-color'] ); $rgb[] = $_GET['text-shadow-opacity']; $textShadow .= 'rgba(' . implode( ',', $rgb ) . ')'; } else { $textShadow .= $_GET['text-shadow-location']; } ?>
$value ) { $weight[$key] = $value . 'italic'; } } printf( "", str_replace( ' ', '+', str_replace( '%20', '+', $_GET['font-family'] ) ), implode( ',', $weight ) ); $_GET['font-family'] = '"' . $_GET['font-family'] . '"'; } else { $_GET['font-family'] = stripslashes( $_GET['font-family'] ); } ?> '>Grumpy wizards make toxic brew for the evil Queen and Jack
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam at dolor non purus adipiscing rhoncus. Nullam vitae turpis pharetra odio feugiat gravida sed ac velit. Nullam luctus ultrices suscipit. Fusce condimentum laoreet cursus. Suspendisse sed accumsan tortor. Quisque pharetra pulvinar ante, feugiat varius nibh sodales nec. Fusce vel mattis lectus. Vivamus magna felis, pharetra in lacinia sed, condimentum quis nisi. Ut at rutrum urna. Vivamus convallis posuere metus vel ullamcorper.
" . str_replace( "\n", "", $_GET['text'] ) . "
"; endif; ?>