eSnippets.net, a code gallery for creating, saving and sharing all kinds of code snippets.

Snippet Code Type — PHP 5 results found

Detect Location by IP (City, State) PHP 1193
Author: rpjs Posted On: Sunday, May 18, 2014 at 12:30 AM

Find location of city and state by IP address, returns "City, State" if found otherwise defaults to "Hollywood, CA"

Adjust Server Time PHP 1075
Author: rpjs Posted On: Saturday, May 17, 2014 at 1:12 AM

Sometimes the time set on your server isn't accurate to what your local time is. If you can't change it, you can adjust it yourself. If your server thought it was 12 midnight, but it was really 7 pm, this will roll the $today variable back five hours to be correct.

URL Validation PHP 1193
Author: rpjs Posted On: Saturday, May 10, 2014 at 9:56 AM

Snippet to validate a url

Get Width/Height of Image PHP 1058
Author: rpjs Posted On: Saturday, May 10, 2014 at 9:55 AM

If all you have for an image is the URL, you can still find the dimensions.

Convert HEX to RGB PHP 841
Author: rpjs Posted On: Saturday, May 10, 2014 at 9:54 AM

Give function hex code (e.g. #eeeeee), returns array of RGB values.