Mardoxx Posted August 2, 2009 Share Posted August 2, 2009 *gives up* it's 5:30AM Quote Link to comment Share on other sites More sharing options...
scbookz Posted August 2, 2009 Author Share Posted August 2, 2009 hallelujah i got it to work!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! i was using wrong item in one spot only $osctag = preg_match_all('/$product_info['products_description']/', $oscfile, $oscmatches, PREG_PATTERN_ORDER); is right but i was trying to get products_description without $product_info it is done i am done with my 3 year project thanks for your time you get a free book out of the deal final code works and is: ------------------------------------------------------- <?php $oscfile = file_get_contents("http://ww1:81/osc/osc/osc/catalog/product_info.php?products_id"); $osc = (get_oscdoc_title($oscfile)); $test = $osc; //function function get_oscdoc_title($oscfile){ $osctag = preg_match_all('/$product_info['products_description']/', $oscfile, $oscmatches, PREG_PATTERN_ORDER); return($oscmatches[1][0]);} $file = file_get_contents("http://www.2.com/IsbnSearch.aspx?isbn={$test}"); $x = (get_doc_title($file)); echo preg_replace('/^Book -/','(10 digit isbn above) -',$x); // retrieve page title function get_doc_title($file){ $h1tags = preg_match_all('/<title>(.*)<\/title>/', $file, $matches, PREG_PATTERN_ORDER); return($matches[1][0]);} ?> it works perfectly now thanks for your time and effort i hope this helps someone else some day all i can say is php is cool Quote Link to comment Share on other sites More sharing options...
co.ador Posted August 2, 2009 Share Posted August 2, 2009 We would like to see the final result, Can you send us a link of your web site? please at least I want to see it I have just started my project and I been working for three month now... Quote Link to comment Share on other sites More sharing options...
scbookz Posted August 2, 2009 Author Share Posted August 2, 2009 oops last code was not working but now it is -------------------------------------------------------------- <?php $oscfile = file_get_contents("http://xx.xx.xx.xx:81/osc/osc/osc/catalog/product_info.php?products_id"); $osc = (get_oscdoc_title($oscfile)); $test = $osc; //function function get_oscdoc_title($oscfile){ $osctag = preg_match_all('/<img src="images\/(.*).jpg/', $oscfile, $oscmatches, PREG_PATTERN_ORDER); return($oscmatches[1][0]);} echo $test; $file = file_get_contents("http://www.cc.cc.cc.cc.com/IsbnSearch.aspx?isbn={$test}"); $x = (get_doc_title($file)); echo preg_replace('/^Book -/','(10 digit isbn above) -',$x); // retrieve page title function get_doc_title($file){ $h1tags = preg_match_all('/<title>(.*)<\/title>/', $file, $matches, PREG_PATTERN_ORDER); return($matches[1][0]);} ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.