News:

Click here for Toll-Free Service for your business starting at $2.00 per month

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - brainiac744

#226
Support Requests / Re: Encrypt and . . . DECRYPT!??!
December 19, 2005, 01:48:41 AM
OK, so they haven't really "cracked" MD5 then, it's really a brute-force attack using a dictionary.
#227
Support Requests / Re: Encrypt and . . . DECRYPT!??!
December 19, 2005, 01:16:24 AM
Wow, that is scary. I've been under the impression all this time (much as you apparantly) that MD5 was (at the time anyway) uncrackable.

EDIT: well, without brute-force that is...
#228
Support Requests / Re: MySQL Problems
December 18, 2005, 10:29:58 PM
Well, I guess the problem was short-lived because mysql appears to be working properly again...
#229
Support Requests / MySQL Problems
December 18, 2005, 10:19:04 PM
Is anybody else having problems with MySQL?

I'm getting this error:
"mySQL error: Too many connections"
No error code.

I assume this means that somebody is hogging all the mysql connections.
#230
And here's a link with more information if you're still interested after that disclaimer that webzone made:

http://www.microsoft.com/typography/web/embedding/weft3/
#231
There is a way to set a specific font from the webserver for the browser to use. I remember reading about it but I don't remember where. I'll see if I can find that article again...
#232

<?php
//define some vars
    
if(!isset($_GET['size'])) $_GET['size'] = "26";
    if(!isset(
$_GET['text'])) $_GET['text'] = "Text";
    if(!isset(
$_GET['font'])) $_GET['font'] = "arial.ttf";
    if(!isset(
$_GET['stroke'])) $_GET['stroke'] = "1";


//find the x and y sizes
    
$size imagettfbbox($_GET['size'], 0$_GET['font'], $_GET['text']);

    
$xsize abs($size[0]) + abs($size[2] + 2);
    
$ysize abs($size[5]) + abs($size[1] + 2);

//create an image
    
$image imagecreate($xsize$ysize);
//set the background color
    
$blue imagecolorallocate($image00255);
//makes the background color transparent
    
imagecolortransparent($image$blue);
//set the text color
if (isset($_GET['r']) && isset($_GET['g']) && isset($_GET['b'])){
    
$font_color ImageColorAllocate($image$_GET['r'], $_GET['g'], $_GET['b']);
}
else {
    
$font_color ImageColorAllocate($image255,255,255);
}

//set the outline color
if (isset($_GET['or']) && isset($_GET['og']) && isset($_GET['ob'])){
    
$stroke_color ImageColorAllocate($image$_GET['or'], $_GET['og'], $_GET['ob']);
}
else {
    
$stroke_color ImageColorAllocate($image000);
}

// now draw out the outline (stroke) on the text
$stroke $_GET['stroke'];
for (
$ox = -$stroke$ox <= $stroke$ox++) {
for ($oy = -$stroke$oy <= $stroke$oy++) {
imagettftext($image$_GET['size'], 0abs($size[0])+$oxabs($size[5])+$oy, -$stroke_color$_GET['font'], $_GET['text']);
}
}

//print the text
    
imagettftext($image$_GET['size'], 0abs($size[0]), abs($size[5]), -$font_color$_GET['font'], $_GET['text']);

//set the type of image
//    header("Content-type: image/gif");
//barf out the image
    
imagegif($image);
//free up memory
    
imagedestroy($image);
?>



Just pasted the whole file.
You'll need to upload a ttf font and set it at the top or add it to the query like:
?font=something.ttf&text=blahblah&size=12&stroke=2

Obviously, you'll want to just set the defaults at the top to what you typically use.
#233
I had this exact same problem. What I ended up doing was writing a PHP script that generates a gif image with an outline around the text. If you want I can go and get the part of the code that outlines the text.
#234
Hehe, now I feel really smart :P
#235
Correct me if I'm wrong, but in an external stylesheet there's no need for the <style type="text/css">, or the </style> lines. That may be your problem.
#236
Here, just add this code to the page that you want to turn error reporting off for:


<?php
//Turn off error reporting
error_reporting(0);
?>

#237
Support Requests / Re: Some php-ish stuff
December 03, 2005, 03:48:04 PM
Here's a function I had laying around that checks for a valid email address, not entirely sure where I got it


function check_email_address($email) {
  // First, we check that there's one @ symbol, and that the lengths are right
  if (!ereg("[^@]{1,64}@[^@]{1,255}", $email)) {
    // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
    return false;
  }
  // Split it into sections to make life easier
  $email_array = explode("@", $email);
  $local_array = explode(".", $email_array[0]);
  for ($i = 0; $i < sizeof($local_array); $i++) {
     if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) {
      return false;
    }
  } 
  if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name
    $domain_array = explode(".", $email_array[1]);
    if (sizeof($domain_array) < 2) {
        return false; // Not enough parts to domain
    }
    for ($i = 0; $i < sizeof($domain_array); $i++) {
      if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$", $domain_array[$i])) {
        return false;
      }
    }
  }
  return true;
}//end check_email_address()


You could call it like this:
if (check_email_address($opmail)) {
    echo "The address is valid.";
}
else {
    echo "The address is invalid.";
}



Hope that helps
#238
Support Requests / Re: [htaccess] RewriteEngine
November 13, 2005, 11:01:52 PM
I'm certainly no expert either, but I THINK I found your problem

RewriteRule ^(fr|en|es|nl)_([a-zA-Z]*).html /index.php?page=$2&lang=$1

That line ^^^^^ is missing a $, it should be this:

RewriteRule ^(fr|en|es|nl)_([a-zA-Z]*).html$ /index.php?page=$2&lang=$1


I THINK...I'm certainly no expert either ;)
#239
Support Requests / Re: FTP problems
October 30, 2005, 03:37:03 AM
It has (for some unknown reason) all of a sudden started working again (23:36 EST)
#240
Support Requests / Re: FTP problems
October 29, 2005, 10:06:46 PM
FTP is also broken for me, the first I noticed it was 17:39 EST