Search found 4 matches

by AccesInterzis
Wed Dec 02, 2009 11:51 am
Forum: PHP - Code
Topic: How do I generate arrangements of n elements taken k in PHP?
Replies: 3
Views: 122

Re: How do I generate arrangements of n elements taken k in PHP?

Yes. But I don`t know how to generate all the arrangements.
by AccesInterzis
Wed Dec 02, 2009 5:12 am
Forum: PHP - Code
Topic: How do I generate arrangements of n elements taken k in PHP?
Replies: 3
Views: 122

How do I generate arrangements of n elements taken k in PHP?

I have the following code:   <?php $string = 'abcdefghijklmnoprqstuvwxyz'; $arrangements = array();   $i = 0; while ($i < strlen($string)) {    $arrangements[] = A($i, strlen($string));//arrangements of strlen($string) elements taken $i each    $i++; } ?> <pre><?php print_r($arrangements) ?></pre>  ...
by AccesInterzis
Wed Nov 25, 2009 4:39 am
Forum: General Discussion
Topic: robots allowed to index only few files
Replies: 1
Views: 300

robots allowed to index only few files

I know that if I write in robots.txt file the following lines:   User-agent: * Disallow: /   all robots won`t be allowed to index the files of the site. My question is: "How do I tell robots not to index the files of site EXCEPT the following three files:first.php, second.php, third.php?"....
by AccesInterzis
Wed Nov 25, 2009 4:14 am
Forum: PHP - Code
Topic: PHP script executed only from a certain machine
Replies: 1
Views: 287

PHP script executed only from a certain machine

I have a PHP script on my index.php file and I want this script to be executed ONLY when I access index.php file from my computer (which is at home). I want this PHP script NOT to be executed when someone else access index.php file from another machine. My problem is that I don`t know how to do this...