Kategoriarkiv: PHP

Checking if someone is online with ICQ in PHP

<?php // *** // ICQ tjek funktion // *** function icq_test($uin) { $arr = file( “http://online.mirabilis.com/scripts/online.dll?icq=$uin&img=1”); $len = strlen($arr[1]); if ($len == 96) { return “<b><font color=\”#00FF00\”>Online</font></b>”; } elseif ($len == 83) { return “<b><font color=\”#FF4040\”>Offline</font></b>”; } elseif ($len == … Læs resten

Udgivet i Knowledge Base, Old Base, PHP, Programmering | Skriv en kommentar

Sessions i php

session_start(); if ( $_SESSION[“nick”] != “”)

Udgivet i Knowledge Base, Old Base, PHP, Programmering | Skriv en kommentar

PHP unicode decoder

function unicode_decode($txt) { $txt = preg_replace_callback( ‘/%u([[:alnum:]]{4})/’, create_function(‘$match’, ‘return “&#”.hexdec($match[1]).”;”;’), $txt ); $txt = preg_replace_callback( ‘/%([[:alnum:]]{2})/’, create_function(‘$match’, ‘return “&#”.hexdec($match[1]).”;”;’), $txt ); return ($txt); }  

Udgivet i Knowledge Base, Old Base, PHP, Programmering | Skriv en kommentar