Jump to content

kev wood

Members
  • Posts

    456
  • Joined

  • Last visited

    Never

Posts posted by kev wood

  1. try putting this at the top of your pages.  test it on only at first save editing all the pages

     

    set_time_limit(108000);

     

    this code should time the session out after 30mins with the time in seconds. if you dont want it to time out simply put a 0 in the ()

     

  2. i have never done what you are asking but as a start i know you can randomly select rows out of a mysql table.  so you could store the players in a table which has i table id.  you could then select the rows at random using the mysql_rand.  using the row id number, enter this on to a blacklist of numbers that should be avoided when selecting the random row.

     

    you would need to look into this a bitmore but it could be a start here is a link which can explain it a bit better than me.  just scroll down for the musql_rand section it is on the comments part at the top.

     

    http://uk2.php.net/rand

  3. is there areason why you have put each line in its own

    $message = "--$mime_boundary\n";

      i have written an email system in php before which in cluded html before.

     

    you can just start the email wit the first

    $message ="

      put all your content after the " and then when you have finished constructing the message finish the line the same as you have at the end of each message.

     

    as for the cv part this could be done using a form to first upload the file and save it on the server and then use the if fille exists function in php to get the file from the server store it in a variable which would hold the absolute path the stored cv.  this could then be used inside a link so the file can be downloaded from the server once it is needed.

     

    sorry if i have missed the point of your post.

  4. i have just been speaking to the company who runs are server and they told me only 200 are allowed to be sent out a day through them so it will be dropped down to 200 emails allowed to be sent out a day. 

     

     

     

     

  5. thanks for the reply.  yes that was sort of what i wanted.  i just need to add a limit on the amount sent.  i have been reading up on what is allowed and most servers permit 500 (this sounds like spamming again i know but bear with me i am going somewhere with this) messages to be sent out each hour.

     

    the problem this system could cause is if there is a company who is lucky enough to have over 500 user registered to there newsletter then once 500 hundred is reached it will stop importing the email address from the list and give the user the message you have reached your limit of allowed emails sent this hour.

     

    and once i have sorted this i will have to then try to find out if there is limits on how many can be sent each day, week or month.  i might only allow 500 a day no matter what the limits are.  this way it should stay under any other limits that are imposed on the send messages.

  6. i work for a company called acmeart and i have been asked to create an email distribution system.  the user has three different layout options they can choose from.  it works by the user is able to upload images and fill out text boxes.  once they have completed this it then constructs a newsletter by placing these images and text in set places on the page.  then it emails this out to the subscribed mailing lists.  the newsletters are only ever sent out to people who subscribe to them and there is will be limits set on how many emails can be sent out to try stop it from being used for spamming.  there is a subscribe and a un-subscribe function available.  i know it sounds a bit suspect but if you would like to look at it so you know i not looking on spamming a can let you.

     

    once this is built it will be sold to companies who have a need to send out newsletters to there mailing lists.

  7. the code does not need to stop the importing of the email address but just stop the emails being sent out.  i could then write some code to destroy the already constructed mailing list and then start the process over again after an hour has passed.

  8. sorry about that, i have created an email distribution system and i need to add a count so when the limit is reached it will not send out anymore emails.  i already have created a count which counts the amount of email address that are imported into the mailing list so i just need to modify this so that it stops importing the address when this limit is reached.  the code i have already is this

     

    // construct mailing list array
    $merc_list = explode(",",$merc_mailingList);
    
    // deploy the emails
    for($i=0; $i<count($merc_list); $i++){

  9. i have created a forgot password form to go with my web site a mysql table holds all the login details and i have i have set up a query to retrieve what i need.

     

    the problem i am having is that no matter what registered name i put in i get the message saying the email address could not be found in the db.  if anyone can see where it has gone wrong please point it out my eyes are sore from looking at  >:(

     

    the code is

    $query="SELECT password FROM merc_users WHERE first_name = '$first_name' AND email_address = '$email_address'";
    $st=mysql_query($query);
    $recs=mysql_num_rows($st);
    $row=mysql_fetch_object($st);
    $em=$row->email_address;// email is stored to a variable
    if ($recs == 0) {  echo "<span class=style3>Sorry Your $email_address is not in our database.<br />
    Please make sure you have entered it in correctly and <a href=\"javascript:history.go(-1)\">try again.</a></span>"; exit;}
    

  10. thanks for all the replies i will go look at the ajax replacement for the iframe.  the website that was in questions is www.acmeart.co.uk/rigtechnew

     

    i just ended up making a bigger iframe to hold the area with the text and titles.  still left with a border when it has been set to zero.

  11. i changed the code ever so slightly to work exactly how i wanted.  i need it for an image upload folder.  when an image is uploaded a thumb nail is created and the original image are both stored on the server in there respective folders.  i need to give the user the option to remove all the file that had been uploaded and this code does exactly what i needed it to.

     

    thank you to all who replied.  here is the final code i used

     

    $dir = 'image/thumbs/';
    foreach(glob($dir.'*.*') as $v){
        unlink($v);
    }
    
    $dir2 = 'image/';
    foreach(glob($dir2.'*.*') as $v){
        unlink($v);
    }
    

     

    the first part deletes all the thumbnail images and the second all the original images.

  12. gingerobot

     

    am i right in thinking that this will delete all files from within the directory and then remove the directory.  from what i have gathered it looks for files with a . in them and removes these.

     

    mlin

     

    thanks for your reply but i know a little bit about the reply before yours so i will look at going down this road for now

  13. dont no why that didnt work on a empty folder according to the php manual it only works on empty folders and the unlink must be used first to empty the folder.

     

    i was looking at the unlink function earlier but some of the files have had random numbers appended to them so to get the unlink file to work i need to know the full file name first to get it to work i think.  i may be wrong tho i will go check that out now. 

×
×
  • 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.