cataiin Posted August 30, 2013 Share Posted August 30, 2013 Hei. Sorry for bad english. Need a little help. I have this code: $mama = $_SERVER['REQUEST_URI']; $tata = rawurldecode($mama); $asta= 'titlu='; preg_match("|$asta(.*)|",$tata,$bunica); $tataie = $bunica['1']; echo $tataie; Result is: http://www.example.com/a/123/b-and-c Now I want to get some text from that page. There is something like: "class":"cjbzeo"," and I need only cjbzeo. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/281689-get-some-text-from-url/ Share on other sites More sharing options...
cyberRobot Posted August 30, 2013 Share Posted August 30, 2013 Sorry, I'm not sure I follow. Where does "cjbzeo" come from? Is it pulled from the string that you got from $_SERVER['REQUEST_URI']? Or do you have PHP pulling the actual content from a website and it's somewhere in that source code? Quote Link to comment https://forums.phpfreaks.com/topic/281689-get-some-text-from-url/#findComment-1447448 Share on other sites More sharing options...
Maq Posted August 30, 2013 Share Posted August 30, 2013 Are you receiving JSON? Quote Link to comment https://forums.phpfreaks.com/topic/281689-get-some-text-from-url/#findComment-1447454 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.