Author Archive

Transparent PNG in IE6 simple, easy mode

March 28, 2012

IE6 should not be supported anymore but, there are alot of users witch use it, becouse they dont know any better or dont know how to install another one. So the hard part will come to the web developer witch need to make the web page ok for everyone including the IE6 users. By default [...]

Tags: , , ,
Posted in HTML, Website's Comments Off

How to submit sitemap.xml to Ask search engine

March 23, 2012

Ask.com search engine have a page where you can submit your sitemap.xml for easy crawling . See the link : http://submissions.ask.com/ping?sitemap=http://wiki.nisi.ro/sitemap.xml Just copy and paste it in your browser and replace http://wiki.nisi.ro/sitemap.xml with your website sitemap link. This is it.

Tags: , , , ,
Posted in Tutorials, Website's Comments Off

Convert decimal number to fraction number in PHP

March 16, 2012

Today I had encountered a nice math problem . To convert a decimal number into it corresponding fraction. Thanks to this post I had fount an easy solution that you can check bellow. I had not used the gmp_gcd function from PHP (witch was used in the post code version) but made a Great Common [...]

Tags: , , , , ,
Posted in PHP & MySQL Comments Off

Get base URL from Javascript, detect http or https

March 12, 2012

When using ajax requests you have to request data from same domain as the domain as the one from where you requesti it. www.mydomain.com is not the same with mydomain.com so when you request it you should be careful not to request from wrong domain becouse no data is sent (“for security reasons”). Following you [...]

Tags: , , , , ,
Posted in Javascript, jQuery Comments Off

How to disable comments notification for WordPress

November 21, 2011

Do you receive alot of emails sent by your WordPress Blog becouse people comment your posts? You can turn this off like this: 1. Login to your blog admin page 2. Click on Settings -> Discussion 3. Search in that list for “E-mail me whenever:” Now by default you receive email when “Anyone posts a [...]

Tags: , ,
Posted in Wordpress Comments Off

Unable to find the wrapper “https”

October 29, 2011

Today I had to put a simple script on one of my hosting server where a “Facebook Login” button was available for login. However when I had to run it I encountered the following error: Warning: file_get_contents() [function.file-get-contents]: Unable to find the wrapper “https” – did you forget to enable it when you configured PHP? [...]

Tags: , , , , , ,
Posted in Apache, PHP & MySQL Comments Off

$_FILES limitation when uploading files in PHP

October 14, 2011

Along with the “upload_max_filesize” when uploading files with PHP there is another parameter named “max_file_uploads” witch prevent uploading more files that the value of this parameter. Default size of this parameter is 20 and is should be enough for more apps then I can count but today I had to repair a bug in a [...]

Tags: , , , , ,
Posted in jQuery, PHP & MySQL Comments Off

7pic – the new free photo hosting service

May 30, 2011

I had stumbled today on 7pic.com website witch is a new and free hosting service for photo sharing. I give it a try and I like it becouse i can use the 7pic uploader to upload picts without to start a browser. Uploaded images are stored in albums and can be shares as an images [...]

Tags: , ,
Posted in Websites & Web services Comments Off

How to use call_user_func_array with a simple function and with class methods

May 28, 2011

In this post you will see a example of using call_user_func_array (from PHP) to call a simple function, a public static method from a class and a public method. First I define one function and one class: function add($p1, $p2){    return $p1 + $p2; }   class CSimpleMath{    function __construct($v1) {     [...]

Tags: , , , , ,
Posted in PHP & MySQL Comments Off

“Progress bar” for long running cron scripts in PHP

May 12, 2011

Long running scripts can be a pain if you dont know how much will be running. If you need to see a progress and flush() or ob_flush() do not work becouse of browser cache you can implement an “email progress bar”. PHP example: $step = 0; $last_percent = 0; $total_rows = while(1) {    $step++; [...]

Tags: , , , ,
Posted in PHP & MySQL, Website's Comments Off