Jump to content

schilly

Members
  • Posts

    870
  • Joined

  • Last visited

    Never

Everything posted by schilly

  1. well it will work for the bot when it loads the page but only the bot will see it.
  2. make sure php has permission to create and/or open that file.
  3. Most likely a permission error. http://ca2.php.net/manual/en/function.readfile.php Check your server php.ini and look for the allow_url_fopen setting.
  4. -check for form submission -open a file and write the $_POST variables to it -use the mail function to send the emails
  5. i don't think that will work. if you are loading that script in your browser the HTTP_USER_AGENT will be you and not the bot. might have to log each USER_AGENT in a db with a session_id maybe. then use session tracking to see if they are still viewing the site. then just display the db info to see which bots are currently indexing.
  6. i'm having problems getting elements to line up properly in IE6. Everything is fine in FF, Safari and IE7 but for some reason IE6 is short about 5px or so compared to the others. I'm assuming this is some kind of IE6 bug that needs a hack. Can anyone help me?
  7. as well as change the height of the bar.
  8. the width and height are in to $imgsize variable. see http://ca.php.net/manual/en/function.getimagesize.php
  9. put <?php php_info(); ?> in a php file and see if it runs. it not then php is either not installed or not configured on your web server.
  10. looks like your on the right track. i would do something like this: <?php echo "<table border='0' cellpadding='10' cellspacing='10'>"; $num = 0; while($r = mysql_fetch_array($result)){ if($num % 3 == 0) //if mod zero then start new row echo "<tr>"; $num++; echo "<td valign='top' width='33%'>"; echo "<table class='product_display'>"; echo "<tr><td>"; echo "<a href='#' id='". $r["img_file"] ."' class='preview'><img src='". $r["img_file"] ."' width='100' border='0' /></a>"; echo "</td></tr>"; echo "</table>"; echo "</td>"; if($num % 3 == 0) //if mod 0 then end row echo "</tr>"; } //fill in rest of table if you don't have enough pics for 3 per row while($num % 3 != 0){ $num++; echo "<td valign='top' width='33%'>"; echo "<table class='product_display'>"; echo "<tr><td>"; echo "<a href='#' id='". $r["img_file"] ."' class='preview'><img src='". $r["img_file"] ."' width='100' border='0' /></a>"; echo "</td></tr>"; echo "</table>"; echo "</td>"; $empty_flag = true; } //if it goes through the previous while then need to add closing tr tag if($empty_flag) echo "</tr>"; echo "</table>"; basically because you want 3 pics per row you have to do mod 3 instead of 2.
  11. hmmm maybe contact the host. any memory errors i get usually fix as soon as i bump up the memory.
  12. grab your data from the db, format how you want it and write it to a file then set the headers to download the file. file download example here: http://www.higherpass.com/php/Tutorials/File-Download-Security/ you should be able to do it without writing the data to a file but i can't remember how off hand.
  13. well for one, if you need to display 6 images you won't be able to do: <img src=(Random.php getRandomImage($directory)) alt = "Random Image" /> i would suggest making an image creation function that takes in your directories: <?php function createImage($dir,$subdir){ // create the image from a random image from the provided directory structure // set your headers to tell the browser an image is coming then output the image data } createImage($_GET['dir'],$_GET['subdir']); ?> then call it by doing <img src='createImage.php?dir=animals&subdir=tigers'> something like that should work. if you want 6 images i would grab 6 images randomly then format it in whatever html you need then output that. you wont be able to use it as an image source though.
  14. add this in: ini_set('memory_limit','20M'); remove the set_time_limit then see if it works.
  15. check your php config file to see what your max upload size is then use ini_set in your script to change it. ex. ini_set('post_max_size', '20M');
  16. you should really use the mime type data in $_FILES['image']['type'] as extensions can be spoofed very easily.
  17. wow you messed it up good. probably need to manually delete the advert from the database.
  18. np i believe Goldeneye meant declaring a global.
  19. looks like the phpnuke site is down whats your site url?
×
×
  • 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.