How to enable remote desktop via ADSL with a Netgear router

1. Log into the router.

2. Select ”Services”’ on the left hand side.


3. Under Services, click on the ”Add Custom Service” button.


4. Fill in the details as depicted below, click ”Apply” and then ”Select”.


5. Under the Inbound Services, click the ”Add” button.

6. Complete the form as below. The Send to Lan Server is the interal IP of the machine you wish to remote control. Click ”Apply”.

7. Select Dynamic DNS and fill in your DynDNS details (or similar provider).

You can now connect via Windows Remote Desktop to the selected machine by using Dynamic DNS host name.

Please ensure that you have enabled Remote Desktop on the workstation / server.

Read full storyComments { 0 }

Validating and sanitizing URLs, Emails, and other inputs with PHP’s filter_* functions

PHP has several built-in filter_* functions that can assist with validating and sanitizing email addresses, URLs, strings, integers, float values, etc.

Please note that this these functions only validate the structure of email address or URL strings, they don’t check if the associated domains actually exist. To obtain a list of all available filters on your system, use the results from the filter_list() function:

< ?php
 
  foreach (filter_list() as $filter)
  {
    echo $filter . "\n";
  }
 
?>

The code above will result in output similar to:

int
boolean
float
validate_regexp
validate_url
validate_email
validate_ip
string
stripped
encoded
special_chars
unsafe_raw
email
url
number_int
number_float
magic_quotes
callback

Read the rest of this entry »

Read full storyComments { 0 }

How to ”Blacklist” or ”Whitelist” an email address in Cpanel

Cpanel uses a service called SpamAssassin to help minimise the amount of spam that email accounts hosted in Cpanel receive. Sometimes SpamAssassin will not always correctly identify what is spam or not. Blacklisting an email address or domain means that no email from the relevant domain will be accepted. Whitelisting an address will do the reverse and all mail from the address or domain will be accepted.

Follow the steps below to setup ”Blacklisting” or ”Whitelisting” in Cpanel:

1.  Open your web browser (Internet Explorer, Firefox or Chrome).

2.  In your address bar type: http://www.(yourdomain).co.za/cpanel

3.  Enter your username and password.

4.  On the home page, under the ”Mail” tab, select the ”SpamAssasin” icon.

5.  Click on the ”Enable SpamAssassin” icon.

6.  Click on the ”Configure SpamAssassin” icon.

7.  You may now ”Blacklist” or ”Whitelist” specific email addresses.

8.  Enter all email addresses that you are wanting to ”Blacklist” or ”Whitelist”.

9.  Click on ”save”.

Read full storyComments { 1 }

Using phpThumb to auto-generate thumbnail images

What is phpThumb

“phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly. The output size is configurable (can be larger or smaller than the source), and the source may be the entire image or only a portion of the original image. True color and resampling is used if GD v2.0+ is available, otherwise paletted-color and nearest-neighbour resizing is used. ImageMagick is used wherever possible for speed. Basic functionality is available even if GD functions are not installed (as long as ImageMagick is installed).” – http://phpthumb.sourceforge.net

phpThumb allows for the following functionality:

  • A watermark image or text can be applied over the thumbnail in one of 10 positions or tiled.
  • A border or frame can be applied.
  • Thumbnails can be a fixed dimension regardless of source aspect ratio and background filled with configurable color. Border corners can optionally be rounded (independant horizontal & vertical radius).
  • Unsharp Mask sharpening.
  • Alpha channel mask from mask file.
  • Auto Contrast / Levels.
  • Bevel edge.
  • Add Blur.
  • Change Brightness.
  • Colorize.
  • Alter Contrast.
  • Drop shadow.
  • Edge Detect
  • Flip Horizontal / Vertical.
  • Change Gamma
  • Grayscale Images.
  • Mean Removal
  • Negative Color
  • Reduce Color Depth
  • Rounded Corners
  • Saturation
  • Sepia
  • Smooth
  • Threshold
  • White Balance

Read the rest of this entry »

Read full storyComments { 0 }

How to reduce a PDF file size with Adobe Acrobat Pro

Follow these practical steps to easily reduce a PDF file size with Adobe Acrobat Pro:

1.  Open the PDF file in Adobe Pro

2.  Click on Advanced in the top menu

3.  Select PDF Optimizer

4.  Set all the DPI fields to 100dpi as shown below

5.  You can also select additional options under ‘Discard User Data’ to safely reduce the file size

6.  Click OK

7.  Save the file under a new file name when prompted

This method will safely reduce a PDF file size without noticeably reducing the quality. One can reduce the file size further by lowering quality settings or further reducing the DPI but a drop in quality will be noticed

Read full storyComments { 0 }