0

I fetched some data(eg:name ,email,phone,mobile etc) from a website using simpleDOMhtml.I want to store it into the database.Which page will write the code and how will write?Please help me.Thanks in advance.

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by binu_ds
0

Which page will write the code and how will write?Please help me.Thanks in advance.

This doesn't make sense. Post your code so far with more explanation.

0

My code is like this

<?php
// example of how to modify HTML contents
include_once('simple_html_dom.php');

// get DOM from URL or file

//$html = file_get_html('http://google.com');


$html = file_get_html('http://yellowpages.sulekha.com/agra/abhay-integrated-technology-ltd-sadar-bazar-agra_contact-address.htm?business=pst');
foreach($html->find('http') as $e)
$e->outertext = '';


// remove all image
foreach($html->find('img') as $e)
$e->outertext = '';

// replace all input
foreach($html->find('input') as $e)
$e->outertext = '[INPUT]';

foreach($html->find('div#div.core_add') as $e)
echo $e->innertext . '<br>';


foreach($html->find('span.myClass') as $e)
echo $e->outertext . '<br>';


foreach($html->find('span[span]') as $e)
$e->outertext = 'span';


// dump contents
//echo $html;
?>

Can I write the datainsertion code into the same page? How will write the code(for eg: name,email,phone etc)to insert the data into database?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.