PHP ORM – Create select box with mysql set or enum

PHP have rich set of functions to solve real time problems in programming and web development.. thanks to Rasmus Lerdorf eval — Evaluate a string as PHP code A SET datatype can hold any number of strings from a predefined list of strings. The ENUM datatype restricts to a single member of the set of … Read more

Install geoip on xampp

Geocoding (finding latitude/longitude for street addresses), Geotagging (tagging media with latitude/longitude coordinates), and Geolocation (finding latitude/longitude of computer with IP X-Forwarded-For). There are some options to install on linux environment: # wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz # gunzip GeoLiteCity.dat.gz # sudo mkdir -v /usr/share/GeoIP # sudo mv -v GeoLiteCity.dat /usr/share/GeoIP/GeoIPCity.dat Install geoip with php5 # sudo apt-get install … Read more

Make your website instantly available in other languages

I think everyone know about google language translation We can use http://www.wibiya.com/ to translate webpage/blog content in worlds very known languages Add the free Google Translate gadget to instantly translate your webpage or blog into other languages: English, Afrikaans, Albanian, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bulgarian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, Estonian, Filipino, Finnish, … Read more

CakePHP vs YII

Have you checked my previous article on CakePHP… https://www.svnlabs.com/blogs/cakephp-in-svnlabs/ Yii (Yes, it is) — a high-performance component-based PHP framework best for developing large-scale Web applications. Yii have features, including MVC, DAO/ActiveRecord, I18N/L10N, caching, jQuery-based AJAX support, authentication and role-based access control, scaffolding, input validation, widgets, events, theming, Web services, and so on. Written in strict … Read more

RESTClient – Web Service Consumer

RESTClient is an application use to visit and test RESTful services. REST (Representational State Transfer) is the model of the Web to consume web resources. The browser makes a request to a URL and receives a response.  The request may be a GET or POST (or a PUT, DELETE, or HEAD) and the response may … Read more

PHP Debug Log – Trace Errors

Hello Friends, I read some where “Quality is not a product.. it is a process 😉 ” I think process is hard-work we do and product is final result we get. But how we make our process to get a good product, as a LAMP developer I think track processes “Debug Log” is good sort … Read more

Create WebThumb using LAMP

We have to install opera/firefox  first on server. Then install Xvfb for Xvfb virtual framebuffer html2image.sh ………………………. #! /bin/sh /etc/init.d/xvfb start export DISPLAY=:7 DISPLAY=:7 opera –remote ‘openURL(‘$1′)’ & sleep 20 DISPLAY=:7  import -window root $2 /etc/init.d/xvfb stop Uses: # ./html2image.sh  https://www.svnlabs.com   webthumb/svnlabs.png Open FireFox in Xvfb: firefox.sh #!/bin/sh mozilla-firefox -a firefox -remote ‘openURL(‘$1′, new-tab)’ || … Read more

Install libpurple with PHP

libpurple is intended to be the core of an IM program. This libpurple PHP binding, which defines a set of internal classes, gives a possibility to use aol and icq (oscar), yahoo, msn, jabber, irc and much more protocols directly from PHP. Write your own IM chat client in PHP, as simply as PHP enables … Read more

FFmpeg

# ffmpeg is a command line tool to convert one video file format to another. It can also grab and encode in real time from a TV card. # ffserver is an HTTP and RTSP multimedia streaming server for live broadcasts. It can also time shift live broadcast. # ffplay is a simple media player … Read more

PHP – File Upload Stream

PHP supports upload file stream… we can stream data to server using PHP stream_open() & stream_write() functions. There is alternate method in PEAR to transfer files to server1 to server2. PEAR have HTTP package for uploading files. HTTP_Request supports GET/POST/HEAD/TRACE/PUT/DELETE, Basic authentication, Proxy, Proxy Authentication, SSL, file uploads etc. <?php require_once “HTTP/Request.php”; $req =& new HTTP_Request(“http://domain.com/upload”); $req->setBasicAuth(“login”, “pass”); $req->setMethod(HTTP_REQUEST_METHOD_POST); $result = $req->addFile(“data”, “/home/svnlabs.mp4”); … Read more