Jump to content

ShogunWarrior

Members
  • Posts

    528
  • Joined

  • Last visited

    Never

Everything posted by ShogunWarrior

  1. Google php captcha and you will turn up some very interesting things.
  2. escapeshellarg is a function, however it is only supposed to be used if the string is going to be passed as an argument to exec or system not to a database function.
  3. boo_lolly's code will work. However, I tested my original code again and there isn't really a reason it should return 0.
  4. I just get Processing..Please wait. And then nothing.
  5. echo "<tr class=\"$class\">\n"; echo "<td>$row[sub_class]</td>\n"; echo "<td>$row[disp] L</td>\n"; echo "<td>".sprintf( '%01.1f',$row[fuel])."</td>\n"; <--------------- THIS IS WHERE I NEED THE DECIMAL POINT echo "</tr>\n";
  6. Just look up classes, here's an example of how you would implement your first menu class: <?php class Cmenu { var $links = array(); function Cmenu() {} function AddLink($url,$title) { $this->links[] = array($url,$title); } function display() { echo '<ul>'; foreach( $this->links as $link ) { echo '<li> <a href="'.$link[0].'" title="'.$title[1].'">'.$link[1].'</a> </li>' . "\n"; } echo '</ul>'; } } $new_menu->display(); would show the menu.
  7. Looks like a bit of a joke. "Chuck Norris" namespace. "Whore" and "Cop" in your examples, incorrectly spelled operators... Edit: Ah, it is a joke, but it still doesn't work for me.
  8. Not really, only as much as error_reporting(0); Will "solve" the problem of writing all sorts of terrible code.
  9. The overall design is quite nice, more function would improve it. PS: Your signature link doesn not work (not formatted properly).
  10. In your output, to place an anchor which you should be able to jump to you would write: <a name="nameofanchor"></a> And to make a link to that anchor: <a href="#nameofanchor">Link to anchor</a>
  11. PHP5 will give warnings with different things like static class functions etc. and it is hassle to switch over so that suggestion isn't so good. However, you could probably download the source, find the file with the version number in it, edit it and compile it.
  12. I had this problem with my old host and you won't be able to make any remote requests (RPC/FSOCK/FOPEN) until your host fixes this.
  13. Look into: http://www.php.net/htmlentities and http://www.php.net/htmlspecialchars
  14. Just do the following and add any pages you want into case statements: switch( $_GET['c'] ) { case "test":{ include('test.php'); break; } case "home": default: { include('home.php'); } }
  15. Do you mean "un" include something. AFAIK that isn't possible because including by definition means you are inserting the code into the current script which obviously can't be reversed.
  16. Have a look at http://www.daviddoranmedia.com/articles/securing-your-downloads which uses Apache Deny All and PHP to grant access to files.
  17. That code is in my signature. It is (I think) pretty well obfuscated (muddle up) code which, when corrected very slightly will output a simple message.
  18. Couldn't you do something safe the likes of: <?php function op_test( $operator, $x, $y ) { switch( $operator ) { case '>':{ return (($x>$y)?(true):(false)); } case '<':{ return (($x<$y)?(true):(false)); } case '=':{ return (($x==$y)?(true):(false)); } default:{ return false; } } } //And then use it like this: if( op_test($operator,$x,$y) ) { echo 'hi'; } ?>
  19. You should include a link back to styleshout in your credits, as the template designer requested.
  20. You could use the stream/file functions to read from it as a socket, and stop at 25 lines. So, something like: $f = fopen('http://site.com/page.php','r'); for( $i=0;$i<25,!feof($f);$i++ ) { //Do something with line $line = fgets($f); } Probably not working code, I don't know the f* functions well for remote pages.
  21. If you can manually create (via FTP/shell) a .htaccess file put it in the main directory with: AddType application/x-httpd-php .htm .html
  22. Get 7zip at http://www.7-zip.org/ which supports Zip, gZip and Tar which is what you want.
  23. Could you fill the table with the cos() and sin() values for each row? I am willing to bet that it would cut out ALOT of work. From what I see in the query it has to compute sin, cos and rad->degree values for each row and that must take up quite a bit of query time. If you could pre-compute the values AFAIK it would remove alot of computation and you could index those columns, at the moment no indexes are being used.
  24. Have a look at: http://www.daviddoranmedia.com/articles/securing-your-downloads which uses Apache Htaccess and PHP.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.