Blog

HTML Parsing and Screen Scraping with the Simple HTML DOM Library
HTML Parsing and Screen Scraping with the Simple HTML DOM LibraryIf you need to parse HTML, regular expressions aren't the way to go. In this tutorial, you'll learn how to use an open source, easily learned parser, to read, modify, and spit back out HTML from external sources. Using nettuts as an ex…[ More ]
PHP uses DOM
PHP uses DOMHTML parsing in PHP is done with the DOM module.$dom = new DOMDocument;$dom->loadHTML($html);$images = $dom->getElementsByTagName('img');foreach ($images as $image) {  $image->setAttribute('src', 'http://example.com/' . $image->getAttribute('src'));}$html = $dom->saveHTML();Here's an exa…[ More ]
How To Fix Php_http.dll is Missing / Not Found Error Messages
How To Fix Php_http.dll is Missing / Not Found Error MessagesOverview of Php_http.dllWhat Is Php_http.dll?Php_http.dll is a type of DLL file associated with PHP php_http.dll developed by The Php Group for the Windows Operating System. The latest known version of Php_http.dll is 5.2.6.6, which was pr…[ More ]
How to easily integrate a PayPal Checkout with PHP
How to easily integrate a PayPal Checkout with PHPPayPal is a renowned payment platform that allows you to accept online payments on your site, by taking care of all the money transactions for you. This transparency really is an appreciated quality that allows developers to integrate checkout soluti…[ More ]
How parse HTML in PHP?
How parse HTML in PHP?I know we can use PHP DOM to parse HTML using PHP. I found lot of questions here on stackoverflow too. But I have a specific requirement. I have an HTML content like below  Chapter 1  This is chapter 1  Chapter 2  This is chapter 2  Chapter 3  This is chapter 3I want to parse t…[ More ]
How can I check if a URL exists via PHP?
How can I check if a URL exists via PHP?$file = 'http://www.domain.com/somefile.jpg';$file_headers = @get_headers($file);if($file_headers[0] == 'HTTP/1.1 404 Not Found') {  $exists = false;}else {  $exists = true;}From here: http://www.php.net/manual/en/function.file-exists.php#75064...and right bel…[ More ]
Concept of Hashing
Concept of HashingIntroductionThe problem at hands is to speed up searching. Consider the problem of searching an array for a given value. If the array is not sorted, the search might require examining each and all elements of the array. If the array is sorted, we can use the binary search, and ther…[ More ]
Get list of files from FTP Server in Java - Using Commons Net API
Get list of files from FTP Server in Java - Using Commons Net APINAGESH CHAUHAN 08:51 CORE-JAVA, JAVA-FTP 1 COMMENTIn today's discussion we will came across 'How to get list of files from FTP server in Java'. We are using 'apache commons-net' API that holds all necessary classes to deal with FTP ope…[ More ]
File upload With Apache HttpClient Library
File upload With Apache HttpClient LibraryFile Upload or Attachments are common in most of applications. In this tip, I will show how to perform file uploads using Apache HttpClient version 4.1.3. You can download it at http://hc.apache.org/downloads.cgiWith normal requests, we send multiple paramet…[ More ]
Exception on httpclient.execute to web server
Exception on httpclient.execute to web server0down votefavoriteI try to send JSON data on web server and get response by this method.public JSONObject postOnServer(JSONObject json) {  HttpResponse response;  JSONObject res = null;  HttpClient httpclient = new DefaultHttpClient();  HttpConnectionPara…[ More ]
HTTP API
HTTP APIIntroductionThis document defines the Open-Xchange HTTP API which is used by the new AJAX GUI. The first chapter describes general definitions and conventions which apply to all server modules. All other chapters describe individual server modules.Low level protocolThe client accesses the se…[ More ]
PHP: Parsing HTML files with DOMDocument and DOMXpath
PHP: Parsing HTML files with DOMDocument and DOMXpathThe DOMDocument PHP class allows us to take an HTML file or HTML text input and convert it into an object that can be easily traversed and queried similar to the way things are done in JavaScript.1. 1. Sample inputFor the following examples we're …[ More ]
PHP Simple HTML DOM Parser
PHP Simple HTML DOM ParserPHP Simple HTML DOM Parser is a dream utility for developers that work with both PHP and the DOM because developers can easily find DOM elements using PHP. Here are a few sample uses of PHP Simple HTML DOM Parser:// Include the libraryinclude('simple_html_dom.php'); // Retr…[ More ]
DO NOT USE REGEX TO PARSE HTML
DO NOT USE REGEX TO PARSE HTMLParsing HTML with PHP is not the difficult task that many think it to be. Often times folks grab for the nearest tool to parse out the bits between other bits, and PHP regular expressions are a great tool for this. However, regular expressions are slow and often need to…[ More ]
page load time with Jquery
page load time with JqueryI want to calculate the page load time; This means from second 0 (a little jquery snippet was loaded) to second x, when the whole page is loaded.i wonder if any one had an experience with it, also ideas how to implement it correctly will be apperciated.please i don't need a…[ More ]
Multipart Upload with HttpClient 4
Multipart Upload with HttpClient 4I usually post about Dev stuff on Google+ - you can follow me there:1. OverviewIn this tutorial we will illustrate how to do a multipart upload operation using HttpClient 4.We’ll use http://echo.200please.com as a test server because it’s public and it accepts m…[ More ]
Java FTP list files and directories example
Java FTP list files and directories exampleThis article describes steps for listing content of a directory on a FTP server using Apache Commons Net API. If you have not been familiar with FTP programming in Java before, it is recommended to read this article: How to start FTP programming with Java1.…[ More ]
Java FTP file upload tutorial and example
Java FTP file upload tutorial and exampleTo write Java code that uploads a file from local computer to a remote FTP server, the Apache Commons Net API is a preferred choice of developers. It has simple and comprehensive API that makes coding with upload files to FTP server with ease.Table of Content…[ More ]
Java - sending HTTP parameters via POST method easily
Java - sending HTTP parameters via POST method easilyI am successfully using this code to send HTTP requests with some parameters via GET methodfunction void sendRequest(String request){  // i.e.: request = "http://example.com/index.php?param1=a¶m2=b¶m3=c";  URL url = new URL(request);   Htt…[ More ]
HttpClient.execute(HttpPost) on Android 4.2 error
HttpClient.execute(HttpPost) on Android 4.2 errorI am following this website http://givemepass.blogspot.hk/2011/12/http-server.html to try to use the android application connect the PHP server to get message.GetServerMessage.javaimport org.apache.http.HttpEntity;import org.apache.http.HttpResponse;i…[ More ]