Jump to content

balistic

Members
  • Posts

    65
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

balistic's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. why not just use $random = rand($min,$max)+1;
  2. where is the script being ran from?
  3. http://www.php.net/array_unique this will do the job nicely
  4. a lot of servers have exec() disabled for security reasons, you might want to check that its available to use.
  5. try running php4 because i think theres some syntax changes i see in there
  6. test it by not using $get_ instead just put the data values in and try it, that way you will know if it works or not, or just echo them out.
  7. So like... <? $imglist=''; $img_folder = "images/users/"; mt_srand((double)microtime()*1000); $imgs = dir($img_folder); while ($file = $imgs->read()) { if (eregi("gif", $file) || eregi("jpg", $file) || eregi("png", $file)) $imglist .= "$file "; } closedir($imgs->handle); $imglist = explode(" ", $imglist); $no = sizeof($imglist)-2; $random = mt_rand(0, $no); $image = $imglist[$random]; echo '<img src="'.$img_folder.$image.'" border=0 width=166 height=134><br />'; echo RemoveExtension($image); function RemoveExtension($strName) { $ext = strrchr($strName, '.'); if($ext !== false) { $strName = substr($strName, 0, -strlen($ext)); } return $strName; } ?>
  8. function RemoveExtension($strName) { $ext = strrchr($strName, '.'); if($ext !== false) { $strName = substr($strName, 0, -strlen($ext)); } return $strName; } usage: echo RemoveExtension($filename);
  9. it should be $sContents = file_get_contents('https://www1.xxxxxx.com/partners/links/cards/details.asp?id=xxxxx&tempid=xxxxxxx'); you need the quote things
  10. so the include is remote? if so your host might have disabled remote includes when upgrading, just ask them.
  11. yeah just needs one added on the end.
  12. yeah, like if (!isset($_GET['postID'])||!isset($_GET['title'])) { $noData = true; echo 'no data was input'; }
  13. just set the script to run monthly using a cron job http://www.tech-faq.com/create-cron-job.shtml cpanel has a spot for setting them up easily http://www.siteground.com/tutorials/cpanel/cron_jobs.htm cpanel tutorial as for storing the username generated, you could store it in the database or save it to a file and include it where wanted.
×
×
  • 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.