If you want to extract data from a webpage and not getting the exact data using different patterns and "PHP String Positions" techniques, then here is the suggestion for you.
This is Simple HTML DOM Parser written in PHP5+ by a Developer on Sourceforge.net
Developer Profile:
http://sourceforge.net/users/me578022/
Download Link:
http://sourceforge.net/projects/simplehtmldom/
Documentions:
http://simplehtmldom.sourceforge.net/
How to Use:
First of all download the simple_html_dom.php File from download link.
// Include the downloded file in your own php file.
include('../simple_html_dom.php');
// Create a DOM First:
$html = file_get_html('http://www.google.com/'); // Create DOM from URL or file
$html = str_get_html($str, $lowercase=true); // Create DOM from String of HTML Script
// find all links
foreach($html->find('a') as $element)
echo $element->href;
// find all images
foreach($html->find('img') as $element)
echo $element->src;
// find all images with full tag
foreach($html->find('img') as $element)
echo $element->outertext;
// find all div tags with id=gbar
foreach($html->find('div#gbar') as $element)
echo $element->innertext;
// find all span tags with class=gb1
foreach($html->find('span.gb1') as $element)
echo $element->outertext;
// find all td tags with attribite align=center
foreach($html->find('td[align=center]') as $element)
echo $element->innertext;
// extract text from table
echo $html->find('td[align="center"]', 1)->plaintext;
// extract text from HTML
echo $html->plaintext;
Read documents for more example.
Saturday, April 11, 2009
Friday, April 10, 2009
Installation Problem in UBUNTU


After installing Ubuntu, i was installing system application
jre-1_6_0_02-linux-i586-rpm.bin. Every thing was going right
suddenly a message of service agreement appeared and the
installation was stopped. I closed the terminal and tried to reinstall
the application. Then i received the message,
"E: dpkg was interrupted, you must manually run
'dpkg --configure -a' to correct the problem."
I couldn't install anything through my terminal or my synaptic manager.
Then i found the solution of this problem.
Solution:
On terminal, execute the following commands:
sudo dpkg --configure -a
sudo dpkg --update -a
Thursday, April 9, 2009
Accedently Replace / Remove Directory From SVN
Problem
Solution
Simply follow these steps mentioned below:
1- $ svn merge -r 977:974 https://som_one.com/repos/home/trunk
2- $ svn commit -m "Recover Lost Directory"
3- $ svn update
Tuesday, April 7, 2009
SOAP
Introduction:
SOAP is an XML-based messaging protocol. It defines a set of rules for structuring messages that can be used for simple one-way messaging but is particularly useful for performing RPC-style (Remote Procedure Call) request-response dialogues. It is not tied to any particular transport protocol though HTTP is popular. Nor is it tied to any particular operating system or programming language so theoretically the clients and servers in these dialogues can be running on any platform and written in any language as long as they can formulate and understand SOAP messages. As such it is an important building block for developing distributed applications that exploit functionality published as services over an intranet or the internet.
Server Side:
As is the case with any client-server paradigm, in the world of web services there are web service providers and web service consumers. Server-Side SOAP is a tutorial which deals with how to build and provide web services using Apache SOAP. We will cover the details of the technology for consuming web services when we work through SOAP on the Client-Side.

Client Side:
Client-Side SOAP is a multi-part tutorial with the aim of introducing you to some of the technologies available for writing clients that consume web services using SOAP.
For detail information:
Follow the link http://www.soapuser.com/index.html
SOAP is an XML-based messaging protocol. It defines a set of rules for structuring messages that can be used for simple one-way messaging but is particularly useful for performing RPC-style (Remote Procedure Call) request-response dialogues. It is not tied to any particular transport protocol though HTTP is popular. Nor is it tied to any particular operating system or programming language so theoretically the clients and servers in these dialogues can be running on any platform and written in any language as long as they can formulate and understand SOAP messages. As such it is an important building block for developing distributed applications that exploit functionality published as services over an intranet or the internet.
Server Side:
As is the case with any client-server paradigm, in the world of web services there are web service providers and web service consumers. Server-Side SOAP is a tutorial which deals with how to build and provide web services using Apache SOAP. We will cover the details of the technology for consuming web services when we work through SOAP on the Client-Side.

Client Side:Client-Side SOAP is a multi-part tutorial with the aim of introducing you to some of the technologies available for writing clients that consume web services using SOAP.
For detail information:
Follow the link http://www.soapuser.com/index.html
Document Comparisons

Compare Files with 'Diff Doc'
(The Comprehensive Document Comparison Tool)Some times more than one person( lets, you & your partner ) are working on the same file that may on ( MS Word/Excel/PowerPoint, PDF, RTF, Text, HTML, XML, Wordperfect ), and suppose you need to check the modifications that have been made by your partner then either you'll request him to inform you about those changes made by him or review the whole file to justify the changes, but it may takes more time & may be you could not correctly justify .
I was also passed through that experience & i faced much problems, so i thought that their must be utility tools to solve such problems & at last i found an excellent utility tool " Diff Doc ", but its a trial version. Following are its features i have test it is really a nice one ....
Diff Doc FeaturesDownload Link for Diff Doc
- Compare documents of MS Word (DOC, DOCX etc), Excel, PDF, Rich Text (RTF), Text, HTML, XML, PowerPoint, or Wordperfect and retain formatting
- Choose any portion of any document (file) and compare it against any portion of the same or different document (file).
- Word to word or letter to letter comparisons. See to the letter what changed in a sentence.
- Compare files of any type against any file type (i.e. An MS Word compared against a. Wordperfect document)
- Integrated into the Windows Explorer Shell (Windows Explorer, Desktop, Find in Files, etc.) for quick comparisons
- Navigate easily through the file differences with the Next (F7), Previous (Shift+F7) etc. navigation buttons. Or use the drop down list box to jump to a specific difference
- Paragraph differences are highly detailed
- Compares text from any application by cutting and pasting into 'Diff Doc'.
- Both 'Side By Side' and the red-lined 'All In One' difference views are supported
- Save any of the views as DOC, Text, RTF or HTML format
- Text and Comma Delimited reports also available
- Compare folders first, then quickly see what files are different and compare with a mouse click
- Compatible with WORLDOX, and any other document management software that supports 3rd party file comparison applications through the command line. Click here for details
- Run it from the Command Line or build your own solutions by using the ActiveX COM interface (available upon request)
http://www.softinterface.com/DL/DL_UserData_Proc.ASP
Subscribe to:
Posts (Atom)