Jump to content
Killersites Forums

frankmill

Member
  • Posts

    7
  • Joined

  • Last visited

frankmill's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks Ben - I have done just that. Don't know why I didn't think of this before! However - just in the interest of not being too dependant on Google, and also of just knowing how to do it - isn't there a simple way of adjusting this code? Frank
  2. Hello All, I am testing 3 pages, and have found a script to rotate between the 3 pages. These are the pages people see after they have opted into a squeeze page. What I would like to do is record in a text file how many times each thank-you page has been "hit". This is the script I have: <? //enter your affiliate urls below, you can enter as many as you want, please //make sure that you have the affiliate url with the SUBID syntax at the end //of it, for reference goto: subids.com for more information. $offer[1] = 'http://urlthankyou1.html'; $offer[2] = 'http://urlthankyou2.html'; $offer[3] = 'http://urlthankyou3.html'; //this is the text file, which will be stored in the same directory as this file, //count.txt needs to be CHMOD to 777, full privlledges, to read and write to it. $myFile = "count.txt"; //open the txt file $fh = @fopen($myFile, 'r'); $offerNumber = @fread($fh, 5); @fclose($fh); //see which landing page is next in line to be shown. if ($offerNumber >= count($offer)) { $offerNumber = 1; } else { $offerNumber = $offerNumber + 1; } //write to the txt file. $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = $offerNumber . "\n"; fwrite($fh, $stringData); fclose($fh); //redirect to the affilate url, + add the subid at the end header('location: ' .$offer[$offerNumber]); ?> At the moment it just records the last offer number it seems. What do I need to do to get it to record the actual number of times each offer is viewed? Is there a way of also getting it to record the number of times the offer is uniquely viewed? Thanks for any help. Hopefully this is an easy one for you guys - I think the "write to the txt file" part of the script needs to be altered, but my php is a little rusty! Regards Frank
  3. Yes there is ..... just found it here: http://www.websitetemplates.name/ as in top post
  4. http://themeforest.net/ http://www.templatemonster.com/ http://www.freewebsitetemplates.com/ Aren't there any killersite templates anywhere? I'm sure it was mentioned somewhere in the web designer course? Cheers Francis
  5. Hello SuperTechies, I am hoping someone can help out with this php question. I've recently moved my website to another webhost, and have come across the php.ini file in the root directory of the website. Within this file are various parameters... for example: display_errors = On error_reporting = E_ALL & ~E_NOTICE log_errors = Off error_log = /logs/php_error_log expose_php = Off max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data memory_limit = 128M ; Maximum amount of memory a script may consume (128MB) My question is, do these parameters, eg memory limit, refer to a single webpage, or a single php script on a webpage, or to the whole site? If I had 2 landing pages with php code in them, would the server alloacte memory limit of 128M * 2, or 128M for both landing pages? My second question is if I got the log_errors = off changed to on, would any bursts above the limits be logged, and where would they go, or is it being logged somewhere else already? Any help most appreciated Francis
  6. Most excellent, thanks Wickham. I uploaded the file to the server and it works fine. In the end I included a webpage to make it look much nicer: <?php //Contact form processing code $yourname = $_POST['name']; $youremail = $_POST['email']; $yoursubject = $_POST['subject']; $yourmessage = $_POST['message']; $emailmessage = "yourname: {$yourname} with an email of: {$youremail} and message of: {$yourmessage}"; include("messagesent.php"); mail('info@logbookcarloan.org.uk', $yoursubject, $emailmessage); ?> Also thanks for the tip grabenair! Will bear that in mind for the future. Regards Frank
  7. Hello All, I'm hoping someone can help me with this.... Have just been through the php videos in the webdesigners course. I'm trying to apply the php stuff by making the contact form on my website usable. I pointed the form (eg when a user clicks on "send" on the webpage) to a page called contactprocess.php, with this code on it: <?php //Contact form processing code $yourname = $_POST['name']; $youremail = $_POST['email']; $yoursubject = $_POST['subject']; $yourmessage = $_POST['message']; $emailmessage = "yourname: {$yourname} with an email of: {$youremail} and message of: {$yourmessage}"; print "Your message has been sent"; mail('info@logbookcarloan.org.uk', $yoursubject, $emailmessage); ?> When I input the contact_us.php page (pointing to contactprocess.php) from localhost I get the following erro: Your message has been sent Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\contactprocess.php on line 21 Line 21 is this one here: mail('info@logbookcarloan.org.uk', $yoursubject, $emailmessage); What do I need to do to get this to work? Kind regards Frank
×
×
  • Create New...