background preloader

PHP

Facebook Twitter

Doc generation / publipostage

Upload. PHP-Zip. PHP cron. Charsets. High Performance PHP Framework for Web Development - Symfony. Optimization. Utils. Model. Write Text Over Image or Picture with PHP. Adding custom text over image or pictures is a good way to declare copyrights or give a simple title information to that graphical image or picture without editing the image itself. PHP has made it very easy to add custom text over image or picture by using some basic functions from PHP GD. Complete code for adding text over image Customizing the text for your usage: Change the $imgPath to image path you want to add text over it.In “$color = imagecolorallocate($image, 255 , 255, 255)” change the color code to color that suites with the image. for example, if the image background is white then change (255, 255, 255) to (0, 0, 0) which is code for black color.

$string is the text will be added over the image. $fontSize is the font size number. Resources: The image used in this article is taken from As always, any comments or suggestion would be really appreciated. The post Write Text Over Image or Picture with PHP appeared first on Recent Solutions. Html - How to add text to an image with PHP GD library.

Charting with PHP

PHPUnit. Debug. PHP tip: How to extract keywords from a web page. Technologies: PHP 5+, UTF-8 Web page keywords characterize the page's topic for a search engine. Extracting keywords requires that you recognize the page's character encoding, strip away HTML tags, scripts, and styles, decode HTML entities, and remove unwanted punctuation, symbols, numbers, and stop words. This article shows how. Get the page text Keyword extraction starts by reading the HTML page into a text string. Whichever way you get the HTML page, once you have the text you'll need to handle the many different character encodings used by international web pages.

Get the web page from a disk file PHP has several functions to read a file from disk. $encodedText = file_get_contents( $filename ); Get the web page from the server PHP has two main ways to connect to a web server and download a page. I've covered these in two separate articles. PHP tip: How to get a web page using the fopen wrappers.

CURL is the more flexible choice. $result = get_web_page( $url ); if ( $result['errno'] ! Predefined Classes.