Mardoxx Posted August 2, 2009 Share Posted August 2, 2009 *gives up* it's 5:30AM Link to comment https://forums.phpfreaks.com/topic/168465-solved-i-am-1-step-away-from-being-done-on-a-3-year-project-please-help-php-code/page/2/#findComment-888681 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 Link to comment https://forums.phpfreaks.com/topic/168465-solved-i-am-1-step-away-from-being-done-on-a-3-year-project-please-help-php-code/page/2/#findComment-888697 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... Link to comment https://forums.phpfreaks.com/topic/168465-solved-i-am-1-step-away-from-being-done-on-a-3-year-project-please-help-php-code/page/2/#findComment-888703 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]);} ?> Link to comment https://forums.phpfreaks.com/topic/168465-solved-i-am-1-step-away-from-being-done-on-a-3-year-project-please-help-php-code/page/2/#findComment-888750 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.