Jump to content

tobydeh

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    London -UK

tobydeh's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. >>>>>>>>>>>>>>>>SOLVED<<<<<<<<<< By creating a clever hack using flush(), ob_flush(), ob_end_flush(),ob_get_level() and ob_start() i was able to push content to tr browser to stop it thinking the page was dead, i also managed some clever calls to free up some memory and then..... Smiles all round :0)
  2. I have never seen anything to do this. You could write a function to read through a DIR, loops through all the files and read them into strings then check for varibales.. but that is a bit of a mission.
  3. you use a Sessoin, This give a unique footprint to everyone that vistsis your site. Sessions are availible across every page on your site. http://uk2.php.net/session_start
  4. tobydeh

    Carts

    Go to php.net and read up on Arrays ans Sessions. A good starting point would be fore you to initialize a session for each user that visits you site then begin to sotre their basket information inside their Session as an array. There are many Shopping Cart tutorials online, just have a seach on google.
  5. Definately not shibby You should always use "is_uploaded_file($_FILES['userfile']['tmp_name'])" as a bare minimum security check. Also in the last comment The example used "Copy()"... Not a good idea. it again doesnt check if the file was uploaded via HTTP POST. look at the following example: <?php // Where the file is going to be placed $target_path = "uploads/"; /* Add the original filename to our target path.  Result is "uploads/filename.extension" */ $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); $_FILES['uploadedfile']['tmp_name'];  $target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(is_uploaded_file($_FILES['uploadedfile']['tmp_name'])) { if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ".  basename( $_FILES['uploadedfile']['name'])." has been uploaded"; } else { echo "There was an error uploading the file, please try again!"; } } ?>
  6. haha, No of course it isnt spam... If it was spam i would get a crappy dektop app and import my CSV of dodgy emails. It is a Newletter App to intergrate into our website at work. It is a large onle gaming website with many users. All of whom have accepted the Newsletter. So.. no more rudeness please...
  7. HI Guys, I am building a newsletter system for our site at work and i cant seem to send all the emails without the page/code falling over. We have 850,000 registered users so its not an easy task. this is my current situation: Render Email Template (Only do this once) Connect to SMTP Say Hello, Prepare server for data (     Select Current Chunk of 500 users from the DB     (         Loop through chunks of 500 emails from the db         Replace User-Specific Tags inside email body.         update row email_sent = true     ) ) Close SMTP Connection At the moment i can only reach around 50,000 emails before the page stops dead. I am utilizing various sleep() calls to try an prevent a timeout, and i have set the PHP max_timeout / memory settings etc. The site uses Mod_rewrite (built using CakePHP) so i cannot call the script from shell using /usr/bin/php/... as it will not start cakes Dispatch system etc, and will not initialize my DB Models. Would it help to call the script from exec()? Calling exec('curl -s /path/to/my/file/')? Does the Apache "Timeout" Setting have any bearing on what i am doing?? I checked out SendStudio's source code, and it seems to do the following... set_time_limit(0) <<Start firing emails>> they do not appear to be doing anything spectacular to avoid timeouts. I Have used send stduio before to email around 340,000 users without any problems so i am most confused. Any help / knowledge in this area would be great as i am absolutely up **** creek without a paddle! F.Y.I The site is on a Dedicated Linux Box at RackSpace, using PHP 4. Kinds Regards in advance, Toby de Havilland.
×
×
  • 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.