Jump to content

xymcrush17

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by xymcrush17

  1. Hello Need a help How to parse file_get_content into an array? <?php include_once('get_data.php');//simple_html_dom.php $postdata = http_build_query( array( 'id' => 'xxx', ) ); $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata ) ); $context = stream_context_create($opts); $result = file_get_contents('http://localhost/test.php', false, $context); I want only get a text that in attribute <div id="console"> YYYY </div> based on $result text that i expect is YYYY thank in advance
  2. Yes, I do. I want to check word that exist in a line of file but it contains letter 'estroaroint'. for example we can find in the line of file like words STORE REST TRAIN EAST RESTORATION ..etc And Thanks for suggestion using Database.. Could you help what sql command to search it what I expect,please?
  3. I have a group of letter that consists letters like $words= 'estroaroint'; that can be arranged to be some words in my list $file = 'dictionary.txt' Here my expected result that on my words list: STORE REST TRAIN RESTORATION ...etc I searched on google and found like : $contents = file_get_contents($file); $pattern = preg_quote($words, '/'); $pattern = "/^.*$pattern.*\$/m"; if(preg_match_all($pattern, $contents, $matches)){ echo "Found matches:\n"; echo implode("\n", $matches[0]); echo strlen($matches); } else{ echo "No matches found"; } But that's not like as my expectation Thanks in advance Warm Regard
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.