<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1029286" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1029286</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-randomtxt#comment-1171467</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;bja888 wrote:&lt;/strong&gt; well i never hear anything about php being faster....&lt;br /&gt;
You do know that asp.net is compiled right?&lt;br /&gt;
I would think a compiled app would work better than a text based one dont you think?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Not necessarily. If it is compiled to bytecode rather than native code, it could be slower than non-compiled interpreted code -- it depends on the interpreter in both cases. Case in point: Java vs. Python (Java can be slower).&lt;/p&gt;
&lt;p&gt;Edit to add: Zend Encoder and Optimizer tools can be used to compile PHP pages for additional performance gains. &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;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;bja888 wrote:&lt;/strong&gt; Still though... people should use what their comfortable with. I just feel that the way asp works feels more.... well, versatile.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Of course it would feel more versatile. You&#039;re familiar with ASP whereas you&#039;re not with PHP. &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 May 2005 07:15:54 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1171467 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-randomtxt#comment-1171466</link>
    <description> &lt;p&gt;well i never hear anything about php being faster....&lt;br /&gt;
You do know that asp.net is compiled right?&lt;br /&gt;
I would think a compiled app would work better than a text based one dont you think?&lt;/p&gt;
&lt;p&gt;Still though... people should use what their comfortable with. I just feel that the way asp works feels more.... well, versatile.&lt;/p&gt;
 </description>
     <pubDate>Fri, 20 May 2005 07:04:35 +0000</pubDate>
 <dc:creator>bja888</dc:creator>
 <guid isPermaLink="false">comment 1171466 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-randomtxt#comment-1171442</link>
    <description> &lt;p&gt;&lt;a href=&quot;http://www.php.net&quot; class=&quot;bb-url&quot;&gt;http://www.php.net&lt;/a&gt; is the official PHP website with all of the documentation. As far as I know, it is not a language like I believe ASP.net is. Either way, PHP is more powerful and the 5.0 on up versions of it are actually FASTER than ASP. I&#039;m not going to tell you that you should be switching over because that would be excedingly difficult and probably unnecessary, but you can&#039;t knock what is currently the dominating server side scripting language on the net just because you use another one.&lt;/p&gt;
 </description>
     <pubDate>Thu, 19 May 2005 18:58:18 +0000</pubDate>
 <dc:creator>Assassin</dc:creator>
 <guid isPermaLink="false">comment 1171442 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-randomtxt#comment-1171440</link>
    <description> &lt;p&gt;Thank you for answering my question. You told me exactly what I needed to know.&lt;br /&gt;
I am only doing this in PHP bacause thats the only language mt clients server supports. I would love to do it in asp.net.&lt;br /&gt;
I have never heard of php.net. Sounds like another stupid idea from microsoft. Php is used way more than asp. I am more comfortable with asp so I will stick with what I know. &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>Thu, 19 May 2005 18:04:44 +0000</pubDate>
 <dc:creator>bja888</dc:creator>
 <guid isPermaLink="false">comment 1171440 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-randomtxt#comment-1171434</link>
    <description> &lt;p&gt;You know, just for giggles, I went to msdn.com, and using their search, looked for how to open a random .txt file in asp.&lt;/p&gt;
&lt;p&gt;Only result that came up was something about service pack 3.&lt;/p&gt;
&lt;p&gt;Here is what I see the problem being:&lt;/p&gt;
&lt;p&gt;You are used to MSDN&#039;s site, and where to find what you are looking for, PHP.net, you are not familiar with, so it doesn&#039;t seem as friendly becasue you cannot easily find what you are looking for.&lt;/p&gt;
&lt;p&gt;You know exactly what you are wanting the script to do, yet you posted a generalized request here. The responce to your generalized question didn&#039;t get you the detailed results you are looking for, so you seem to have the ideal that PHP sucks and it is better to stick with ASP.&lt;/p&gt;
&lt;p&gt;People are going to read your attitude on this, and are going to be less likely to offer help in the future as to avoid the same ungratefull responces.&lt;/p&gt;
&lt;p&gt;Its a fact that trying a new language is difficult when you are used to soemthing else. That is why I stick with PHP for web and VB for standalone software. I&#039;m used to both and know what I&#039;m doing, and can easily find help. &lt;/p&gt;
&lt;p&gt;I know it gets frustrating, you are trying to do something a new way, when in your mind you know &quot;I can do it the other way&quot;. That is how I am when it comes to switching from suing tables over to CSS for layout. I start trying to do it in CSS, then time gets running short, and deadlines come up, and well, I&#039;m a bad boy and throw in a table.&lt;/p&gt;
&lt;p&gt;My advise, try to have a little more patience. Ask more specific questions. Spend the time to browse through functions at php.net. I still go there when I get a chance and look up functions I never used before. There are several I came across that way that gave me ideas of better ways to write code. &lt;/p&gt;
&lt;p&gt;If you are in a hurry to get this script running, then I would say do it in ASP, don&#039;t try learn something new when it is something needed ASAP. (like the way I tried learning CSS, i didn&#039;t get anywhere, and didn&#039;t retain what little I did learn).&lt;/p&gt;
&lt;p&gt;Good luck on your learning of PHP. I am more than willing to help those who appricate the help and want to learn it, and have the patience for learning it.&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Thu, 19 May 2005 17:00:06 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1171434 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-randomtxt#comment-1171390</link>
    <description> &lt;p&gt;How rude bja... What you wanted was a simple way to open a text file and that&#039;s what you were told - what exactly is wrong with PHP&#039;s functionality?!!!&lt;/p&gt;
&lt;p&gt;And, as shown by Assassin there is more than one way to do it, but why bother taking the convoluted route when PHP has a shortcut built in?&lt;/p&gt;
&lt;p&gt;PHP is more popular than ASP for a reason you know &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 19 May 2005 11:55:52 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1171390 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-randomtxt#comment-1171371</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;bja888 wrote:&lt;/strong&gt; A single function?!?!?!&lt;br /&gt;
Thats practical but not versatile.&lt;br /&gt;
I&#039;ll stick with asp as my main language.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Huh? This is what you asked:&lt;/p&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;bja888 wrote:&lt;/strong&gt; Can someone give me a extreamly simple script for opening and reading from a random .txt document in php?&lt;br /&gt;
...&lt;br /&gt;
now what about opening and reading from a text file. I am more consirned about that.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;That is precisely what that function does (opening a .txt simply).&lt;/p&gt;
&lt;p&gt;Versatility? In what sense? What options do you need? What are you trying to do?&lt;/p&gt;
&lt;p&gt;There are many ways of handling files: Assassin provides one more example.&lt;/p&gt;
&lt;p&gt;Did you read the documentation I linked to?&lt;/p&gt;
 </description>
     <pubDate>Thu, 19 May 2005 06:20:36 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1171371 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-randomtxt#comment-1171365</link>
    <description> &lt;p&gt;well you could go through:&lt;/p&gt;
&lt;p&gt;&amp;lt;?PHP&lt;br /&gt;
$file = &quot;random.txt&quot;;&lt;br /&gt;
$handle = fopen($file, &quot;r+&quot;);&lt;br /&gt;
rewind($handle);&lt;br /&gt;
$contents = readfile($handle);&lt;br /&gt;
fclose($handle);&lt;br /&gt;
?&amp;gt;&lt;/p&gt;
&lt;p&gt;But you&#039;d be wasting a lot of time if all you wanted to do is read the file.&lt;/p&gt;
 </description>
     <pubDate>Thu, 19 May 2005 03:36:32 +0000</pubDate>
 <dc:creator>Assassin</dc:creator>
 <guid isPermaLink="false">comment 1171365 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-randomtxt#comment-1171363</link>
    <description> &lt;p&gt;A single function?!?!?!&lt;br /&gt;
Thats practical but not versatile.&lt;br /&gt;
I&#039;ll stick with asp as my main language.&lt;/p&gt;
 </description>
     <pubDate>Thu, 19 May 2005 03:20:41 +0000</pubDate>
 <dc:creator>bja888</dc:creator>
 <guid isPermaLink="false">comment 1171363 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/php-randomtxt#comment-1171359</link>
    <description> &lt;p&gt;PHP.net &amp;gt; Documentation (English) &amp;gt; Function Reference &amp;gt; &lt;a href=&quot;http://www.php.net/manual/en/ref.filesystem.php&quot; class=&quot;bb-url&quot;&gt;Filesystem Functions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In particular, look into &lt;a href=&quot;http://www.php.net/manual/en/function.file-get-contents.php&quot; class=&quot;bb-url&quot;&gt;file_get_contents()&lt;/a&gt;, as well as the functions listed under the See Also heading. Read the comments too.&lt;/p&gt;
&lt;p&gt;Typically, file_get_contents is used thus:&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;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// store contents of /path/to/file in $myfile as a string&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$myfile &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;file_get_contents&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;/path/to/file\&quot;);&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;The Function Reference is invaluable. This is the section of the Documentation you should be spending most of your time in.&lt;/p&gt;
 </description>
     <pubDate>Thu, 19 May 2005 01:42:01 +0000</pubDate>
 <dc:creator>Abhishek Reddy</dc:creator>
 <guid isPermaLink="false">comment 1171359 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
