<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>aipacommander</author_name>
  <author_url>https://blog.hatena.ne.jp/aipacommander/</author_url>
  <blog_title>ITの隊長のブログ</blog_title>
  <blog_url>https://www.aipacommander.com/</blog_url>
  <categories>
    <anon>PHP</anon>
  </categories>
  <description>WordPressで開いているページのuriを修正して別リンクにするということをやりたかったときに書いたプログラムをメモ。 &lt;?php $uri = $_SERVER['REQUEST_URI']; $replaceUri = preg_replace('/^\/.+?\/(.+)?\/$/', '$1', $uri); でもこれって、ダメらしい。なぜなら$_SERVER['REQUEST_URI']という値は、必ずしも/の値からスタートするものではない。つまりリクエスト次第ではhttp://〜からスタートするリクエストもあるとか。 今度調べる。こわひPHP。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.aipacommander.com%2Fentry%2F2015%2F07%2F19%2F162110&quot; title=&quot;【PHP】$_SERVERというスーパーグローバル変数からURIを取得する方法。あ、アンチパターン記事です。 - ITの隊長のブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>http://cdn.mogile.archive.st-hatena.com/v1/image/aipacommander/297789129598967254.gif</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-07-19 16:21:10</published>
  <title>【PHP】$_SERVERというスーパーグローバル変数からURIを取得する方法。あ、アンチパターン記事です。</title>
  <type>rich</type>
  <url>https://www.aipacommander.com/entry/2015/07/19/162110</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
