scbookz Posted April 13, 2010 Share Posted April 13, 2010 i upload a csv excel sheet to my store and inside my sheet i will have a function get to grab a title from a web page anyway i had ti working at one time but my server crashed so i am on the cloud now as my server but i forgot how i did it before so... can some one please explain in easy terms how i can imbed a GEt in my .php page that will make a variable so my function get till get that variable in the get function here is my code and the problem is i have 10,,000000000 pages and each time a page is pulled this variable needs to change( (see: variable that changes) with each new page called open) $file = file_get_contents("http://www.xxxxxxxxxxxxxxxx.com/isbn=variablethatchanges"); $x = (get_doc_title($file)); echo preg_replace('/^bbbbbbb-/','(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/198338-get-function-specific-help-please/ Share on other sites More sharing options...
Ken2k7 Posted April 13, 2010 Share Posted April 13, 2010 I think you left out the "?" sign before "isbn". Not sure if that's what you're getting at. Link to comment https://forums.phpfreaks.com/topic/198338-get-function-specific-help-please/#findComment-1040674 Share on other sites More sharing options...
teamatomic Posted April 13, 2010 Share Posted April 13, 2010 $file = file_get_contents("http://www.xxxxxxxxxxxxxxxx.com/index.php?isbn=variablethatchanges"); HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/198338-get-function-specific-help-please/#findComment-1040676 Share on other sites More sharing options...
scbookz Posted April 13, 2010 Author Share Posted April 13, 2010 yes i have the get code right i just need help on GET part all i am saying is how do i use the $_GET function to grab that variable from a local web sit eand then it grabs a title from the distant web site 1)$GET gets the variable at the top of the page or inside another local server page 2)get() function uses 1) variable to get title from distant server page thanks in advance Link to comment https://forums.phpfreaks.com/topic/198338-get-function-specific-help-please/#findComment-1040700 Share on other sites More sharing options...
teamatomic Posted April 13, 2010 Share Posted April 13, 2010 Where does the isbn come from? HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/198338-get-function-specific-help-please/#findComment-1040717 Share on other sites More sharing options...
Ken2k7 Posted April 13, 2010 Share Posted April 13, 2010 How are you specifying the URL to put in file_get_contents? Are you not adding "isbn=variablethatchanges" manually? If it's dynamically, how is it being defined? Either way, you already have that value to begin with. Link to comment https://forums.phpfreaks.com/topic/198338-get-function-specific-help-please/#findComment-1040718 Share on other sites More sharing options...
scbookz Posted June 5, 2010 Author Share Posted June 5, 2010 the isbn comes from my spreadsheet i upload Link to comment https://forums.phpfreaks.com/topic/198338-get-function-specific-help-please/#findComment-1068344 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.