| Answer1: Hi Thusha,
well,even in case this post had been resting for long time not answered. i will try to answer this, hoping it would help somebody else or even may be for you to see an alternative.
since you parse the source fill, try this // open a file
$file = fopen($some_file, "r");
// store the content into a variable
$contents = fread ($file, filesize($some_file));
// extract the string you need, HTML or whatever
$string = "<p class=\"text\">This is my string</p>";
// use preg_match_all() for multiple occurances of
specific string,
// otherwise use preg_match()...
preg_match_all('<matching_rule>', $string,
$raw_results);
// then do whatever you want with $raw_results
array...
well, once you have retrived the bit of the info, it wont be a problem for you storing it in the database. go through mysql functional reference in php manual. if you are trying to make mysql and php to work together for the first time, you might sometimes may be experiencing the version conflict between the versions of php and mysql.
i guess you should not be experiencing problem with that now!
try the above thing and get back if the suceeding problem is mysql & php. try out atleast once to connect mysql with php by going through the manual before posting! which would make you more clear when you come back again!
Hope this helps! |