<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1023806" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1023806</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-expression-matching#comment-1146125</link>
    <description> &lt;p&gt;glad i could help &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 20 Feb 2004 22:09:23 +0000</pubDate>
 <dc:creator>druagord</dc:creator>
 <guid isPermaLink="false">comment 1146125 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-expression-matching#comment-1146123</link>
    <description> &lt;p&gt;I think we have a winner! &lt;/p&gt;
&lt;p&gt;I never thought of using that method!&lt;/p&gt;
&lt;p&gt;Thank you very much!&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Fri, 20 Feb 2004 22:01:26 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1146123 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-expression-matching#comment-1146121</link>
    <description> &lt;p&gt;Ok my brain seems to be waking up now &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
&lt;p&gt;do not put a wildcard in the array just put the allowable letters&lt;br /&gt;
like&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt; $callingMod&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[] = \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;de.\&quot;; &lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$callingMod&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;rep.\&quot;;&lt;br /&gt;&lt;br /&gt; foreach (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$callingMod&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$calling&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)&lt;br /&gt;&amp;nbsp; if ( substr(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thisReferer&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;,0,strlen(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$calling&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;))==&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$calling&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$refererOK&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = TRUE;&lt;br /&gt;&lt;br /&gt;if (!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$refererOK&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; // Give message letting them know it was an invalid direct access and exit script&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Continue with program... &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if ( )&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; // Give message letting them know it was an invalid direct access and exit script&lt;br /&gt;} &lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Fri, 20 Feb 2004 21:52:00 +0000</pubDate>
 <dc:creator>druagord</dc:creator>
 <guid isPermaLink="false">comment 1146121 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-expression-matching#comment-1146117</link>
    <description> &lt;p&gt;That would require me to list out every mod that is valid instead of using wildcards, which is what I currently have going on now and am trying to avoid.&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Fri, 20 Feb 2004 21:35:31 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1146117 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-expression-matching#comment-1146112</link>
    <description> &lt;p&gt;do you know about the in_array function&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt; $callingMod &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$refData&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;mod&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// Sets it to the refering pages MOD setting&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;in_array&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thisReferer&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$callingMod&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;))&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// Give message letting them know it was an invalid direct access and exit script&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;} &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;would that be acceptable sorry i must be tired i don&#039;t grasp what you are trying to do exactly&lt;/p&gt;
 </description>
     <pubDate>Fri, 20 Feb 2004 21:25:18 +0000</pubDate>
 <dc:creator>druagord</dc:creator>
 <guid isPermaLink="false">comment 1146112 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-expression-matching#comment-1146108</link>
    <description> &lt;p&gt;the thing is, each mod has a section that creates an array of acceptable referers, and would like to just be able to do a foreach loop to check them all instead of having to do multiple if statements.&lt;/p&gt;
&lt;p&gt;sample of what I&#039;m am looking for is:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;$callingMod &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$refData&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;mod&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// Sets it to the refering pages MOD setting&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$refererOK &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;FALSE&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;br /&gt;foreach (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$callFrom &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thisReferer&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;&amp;nbsp; if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;preg_match&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thisReferer&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$callingMod&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)) &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$refererOK &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;TRUE&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;&lt;br /&gt;if (!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$refererOK&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// Give message letting them know it was an invalid direct access and exit script&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// Continue with program...&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I am thinking that instead of just doing &lt;strong&gt;$callFrom[] = &quot;de.taxes&quot;&lt;/strong&gt; listing the actual mod info, I can set the arrays to be the actual expression matching strings to make things simpler.&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Fri, 20 Feb 2004 21:11:33 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1146108 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-expression-matching#comment-1146102</link>
    <description> &lt;p&gt;i&#039;m not sure i follow you but but couldn&#039;t you just compare &quot;de.&quot; to you the first 3 letter of your variable&lt;/p&gt;
 </description>
     <pubDate>Fri, 20 Feb 2004 20:45:37 +0000</pubDate>
 <dc:creator>druagord</dc:creator>
 <guid isPermaLink="false">comment 1146102 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/help-expression-matching#comment-1146073</link>
    <description> &lt;p&gt;PS. The use of &lt;strong&gt;de.*&lt;/strong&gt; is not specific, the * can be replaced with the expresion that does a match to anything. I just used an asterick as that is what i&#039;m used to for wildcards.&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Fri, 20 Feb 2004 02:26:14 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1146073 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
