Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Webページの30番目の単語を取得したい場合、どうすればよいのか、それとも可能かどうか疑問に思っていました。25番目または任意の数にすることができますが、私のジレンマはこれを行う方法についてです。これも可能ですか?ありがとうございました。
file_get_contents()を使用してページを取得し、次にexplode()を使用してページを配列に分割し(スペースを区切り文字として指定)、my_exploded_array[x]を実行します。Xは目的の単語です。file_get_contentsは、レンダリングされたページではなく、HTMLを返すことに注意してください。