ZoCX Posted October 25, 2011 Share Posted October 25, 2011 hello there, i want to preg_match someting from curl "keywords" example <meta content='bla bla bla...' name='description' /> <meta content='bla bla bla...' name='keywords' /> how you can see all start disame with " <meta content=' " how i can make the preg_match to get the last " <meta content=' " and not the first one, i just need the preg_match command i try this command ... $patterns[3] = '/(?:.*)<meta content=\'(.*?)\' name=\'description\' \/>(?:.*)/i'; $replacements[3] = 'Desc=[$1]<br />'; Quote Link to comment Share on other sites More sharing options...
requinix Posted October 25, 2011 Share Posted October 25, 2011 get_meta_tags Quote Link to comment Share on other sites More sharing options...
ZoCX Posted October 25, 2011 Author Share Posted October 25, 2011 hello there, its good that but its not what i need, to i make like that its to many request and i have already to many, i get from website the title desc and keywords can someone tell me how i can make the preg_match for this ? Quote Link to comment Share on other sites More sharing options...
requinix Posted October 25, 2011 Share Posted October 25, 2011 What's your code now? Quote Link to comment Share on other sites More sharing options...
QuickOldCar Posted October 26, 2011 Share Posted October 26, 2011 preg_match("|<meta[^>]*description[^>]*content=\"([^>]+)\"[^>]*>|smUi",$html, $matches); 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.