Archive for category php
Apache IPv6 UMTS server @Nokia N900
Nokia N900 is the first mobile device that can do "dual-stack" IPv4 and IPv6 connection on packet data mobile networks (EDGE,UMTS,HSPA) – well, 2 separate PDP contexts anyway, but close enough since it is not really supported by 3GPP yet. It requires some kernel modifications, which I cannot provide here, but if there is any interest send me email and I can provide some info on that subject…
Anyway, once we have IPv6 connectivity to internet we can also setup device to act as web server – since it is a Linux device this is not too hard to do. However, most mobile operators block the incoming TCP connection toward clients to prevent overcharging, so contact your ISP to verify if incoming connections are allowed. Here is the output from my ifconfig, that shows two active mobile data interfaces and sessions, one for IPv4 and second for IPv6:
gprs0 Link encap:UNSPEC HWaddr *
inet addr:10.10.9.14 P-t-P:10.10.9.14 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MTU:1400 Metric:1
RX packets:1158 errors:0 dropped:0 overruns:0 frame:0
TX packets:1294 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:162582 (158.7 KiB) TX bytes:139618 (136.3 KiB)
gprs1 Link encap:UNSPEC HWaddr *
inet6 addr: 2a02:840:beef:30::2/0 Scope:Global
UP POINTOPOINT RUNNING NOARP MTU:1400 Metric:1
RX packets:73 errors:0 dropped:0 overruns:0 frame:0
TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:8680 (8.4 KiB) TX bytes:39414 (38.4 KiB)
md5 / sha1 calculator
Ce bo kdo rabil, vedno mi je slo na zivce, ko sem iskal md5 hash kaksne fraze…
lpm
IPv4 / IPv6 calculator
Sem se malo poigral in naredil IP kalkulator… OK, zaenkrat je samo ipv4, na ipv6 delam, bo v kratkem
lpm
Captcha with jQuery, ajax and php
A while ago I came across this guide, as I was searching for some simple captcha implementation for some website. Plain and simple, all clear. The only thing I didn't like too much is the javascript part, for webpages I mainly use jQuery for javascripting, so I wanted to use jquery for ajax functions. Also, including multiple inputs besides captcha code makes javscript more comeplex (please read the comments, near the end) nad that is where jquery comes in handy.
The simplest possible example you can find on http://mihap.si/share/captcha/.
What we need:
Skrajsevalnik spletnih naslovov | mihap.si
Ja, vem da jih je ze veliko, ampak sem imel malo prevec casa in sem se sam spisal enega.
Bom spisal se kratko skriptico, da se ga bo dalo poklicati od zunaj s preprostim HTTP POSTom, navodila prilepim sem.

lpm
Skrivanje posrednika strani | hide referrer
Vcasih je dobro skriti, preko katere spletne strani smo prisli na nek streznik. Namrec, ko obiscemo neko spletno stran, ta preko "referer" polja (oz posredniskega polja po slovensko) ve, s katere strani je bil zahtevek linkan na to stran. Skrivanje tega podatka je uporabno, ko hocemo to skriti – npr. vsi uporabniki torrent strani vedo, da so vse povezave na strezniku linkane preko hiderefer posredniske strani, ali pa njej podobnih. Tako se nikjer ne vidi dejanskih torrent trackerjev, s katerih je bila povezava prevezana.
Resitev je preprosta – imeti moramo spletno stran, katera prestreze nas zahtevek in nas preusmeri na zeljeno stran – tako bo kot vir povezave na koncnem strezniku prikazana vmesna stran in ne tista, s katere je bil zahtevek dejansko sprozen (pri IE in Firefoxu se referrer polje izbrise pri takem nacinu redirecta, najbrz zaradi referrer spama, vseeno pa posredniska stran ni vidna). To lahko zelo preprosto implementiramo s pomocjo php skriptice, katera naredi natancno to.
Moja implementacija – http://mihap.si/?s=hide