Jump to content

newhorizonz

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by newhorizonz

  1. Hi Lindsey I have had experience of Outlook not connecting after moving the web site to a new server. This happens because (not commonly known) Outlook caches the login information so when you try to call the new mail server, it is still pointing to the old one! To get round this you can change the call to mail.rondelkennels.com to the IP address (123.45.67.890 - replace this with the actual TCH IP). Also problems can be caused by certain ISP's who do not allow you to send mail through a third-party ISP - so the SMTP mail.rondelkennels.com might need to be changed to smtp.whoeveryourISPis.com. This would certainly explain Outlook connections but it doesn't explain why she cannot connect to Webmail - the only systems we have never been able to connect through to webmail are large organisations who ban connections to port 2095. To see if this is a problem get her to go to http://mail2web.com and try logging in through that. If all else fails we could look at the problem from her perspective - check your PM for details of how to set this up. Regards Alan New Horizonz
  2. Assuming you have named the script 'date.pl' then you call it by putting the following at the point in the html where you want it to appear: <!--#include virtual="cgi-bin/date.pl" --> No it won't do real time - that's where the DHTML script comes in. You could use a combination of that and date.pl but configure date.pl so that it does not show the time (date only)
  3. Have a look here: http://www.design-ireland.net/index.php?ht...n/design-10.php
  4. Heres a Perl script that displays the date (and optional greeting) along with the time the page loaded (static). Once set up up you can put it into each page using Server Side Includes #!/usr/bin/perl ######################################################### # Junies Creations # # Advanced Greeter with Date and Time # # v 2.0 # # Copyright © 2001 by Junies Creations # # http://juniescreations.hypermart.net # ######################################################### # Last Updated 04/13/01 # To read this file properly set the text Font to Fixedsys the Style to # Regular and the Size to 10 with Word Wrap OFF. # # Almost all text files including scripts use this format. This is the # way text is shown in DOS or any other NON-Windows view. # Define user variables ####################################################################### # Debug Information - Turn this on if you are having Time problems # 0 = Off # 1 = On $debug = 0; # Font Color for all text printed. Type color name, example black # or type the HTML numbers, example #000000 $fontcolor = "white"; # Font Style for all text printed $fontstyle = "arial"; # Font Size for all text printed $fontsize = "1"; # How should everything be displayed? (Left, Center, Right) $align = "right"; # Should greeting, date, and time be on the same line or on their own? # Greeting will be right next to the greeting image No matter either setting # 0 = Same Line # 1 = Their own lines $dline = 0; # How do you want to display the Greeting? # 0 = NO Greeting - If this is set don't worry about where the images are # 1 = Greeting without Images - If this is set don't worry about where the images are # 2 = Greeting with Images - Set where the images are below $gdisplay = 0; # The default greetings you can change them @greeting = ("Good Morning","Good Afternoon","Good Evening"); # Where are the images stored - Make sure to keep the trailing backslash / $imagestored = "http://www.yoursite.com/images/"; # Image names - Only change if you rename these files @image = ("image1.gif","image2.gif","image3.gif"); # Do you want the Weekday shown? Monday, Tuesday, etc. # 0 = Not Shown # 1 = Show it $wdisplay = 1; # How do you want the Date Displayed? # 0 = NO Date # 1 = June 14 # 2 = June 14, 2000 # 3 = 6/14/00 # 4 = 6-14-00 # 5 = 14/6/00 # 6 = 14-6-00 $ddisplay = 2; # Time Zone information. What Time Zone are you in? # 0 = Use you website server time zone # To set your time zone -- Set $timezone to 0 and then add or # subtract hours as needed. Examples subtract 5 hours # $timezone = -5; or add 5 hours $timezone = +5; $timezone = 1; # How do you want the Time Displayed? # 0 = No Time # 1 = 1:34 PM # 2 = 1:34:23 PM # 3 = 13:34 # 4 = 13:34:23 $tdisplay = 1; # End of user variables ####################################################################### @month = ("January","February","March","April","May","June","July", "August","September","October","November","December"); @day = ("Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday"); $tday = ""; $greet = ""; $gtype = 0; $newyear = 0; # Get the Date from the users computer $timezone = $timezone * 3600; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time+$timezone); # Y2k Patch probley will be needed $yyear = 1900 + $year; # Y2K Patch $newyear = $yyear - 2000; # Find the year in 2 digit format if($newyear < '10'){ # If it's a single number add a zero $newyear = "0$newyear"; # that way it shows 2 digits } $newmonth = $mon + 1; # Perl starts at 0 and calander starts # at 1 if($hour > '23'){ # Checks to see if it Midnight $hour = 12; # Makes it display the hour 12 $tday = "AM"; # Display AM } elsif($hour > '12'){ # Get rid of the Military time and $hour = $hour - 12; # put it into normal time $tday = "PM"; # If past Noon and before Midnight set } # the time as PM else { $tday = "AM"; # If it's past Midnight and before Noon } # set the time as AM if($hour eq '12'){ # 12 O'clock Noon falls thru all the steps $tday = "PM"; # so make it read PM. Otherwise the above } # else statement makes it AM if($hour <= '0'){ # When it is Midnight the hour is 0 this $hour = 12; # makes the hour 12 or Midnight $tday = "AM"; # Extra Check } if($min < '10'){ # Fixes the display of Minutes below 10 $min = "0$min\n"; # it displays 03 instead of 3 } if($sec < '10'){ # Fixes the display of Seconds below 10 $sec = "0$sec\n"; # it displays 03 instead of 3 } if($hour < '6' || $hour eq '12' && $tday eq "PM") { $greet = $greeting[1]; # If it is 12 - 5 PM print the $gtype = 1; # greeting Good Afternoon } if($hour >= '6' && $hour < '12' && $tday eq "PM") { $greet = $greeting[2]; # If it is 6 - 11 PM print the $gtype = 2; # greeting Good Evening } if($tday eq "AM") { # Else it is moring and print $greet = $greeting[0]; # greeting Good Morning $gtype = 0; } if($dline eq '0'){ # How is everything printed? All $dline = " &nbsp"; # on the same line. } else{ $dline = "<br>"; # Or on their on lines. } # Generate a HTML page to print to print "Content-type: text/html\n\n"; print "<html>\n<head><title>Simple Date Script</title></head>\n<body>\n"; print "<font color='$fontcolor' face='$fontstyle' size='$fontsize'><p align='$align'>\n"; # Print the Greeting if($gdisplay eq '1'){ print "$greet\n"; } if($gdisplay eq '2'){ print "<img src='$imagestored$image[$gtype]' alt='$greet'>\n"; print " $greet\n"; } # Show the Weekday if($wdisplay eq '1'){ $wdisplay = $day[$wday]; print "$dline$wdisplay "; } else{ $wdisplay = ""; } # Print the Date if($ddisplay eq '1'){ print "$dline$month[$mon] $mday\n"; } if($ddisplay eq '2'){ print "$dline$month[$mon] $mday, $yyear\n"; } if($ddisplay eq '3'){ print "$dline$newmonth/$mday/$newyear\n"; } if($ddisplay eq '4'){ print "$dline$newmonth-$mday-$newyear\n"; } if($ddisplay eq '5'){ print "$dline$mday/$newmonth/$newyear\n"; } if($ddisplay eq '6'){ print "$dline$mday-$newmonth-$newyear\n"; } # Print the Time if($tdisplay eq '1'){ print "$dline$hour:$min $tday \n"; } if($tdisplay eq '2'){ print "$dline$hour:$min:$sec $tday &nbsp\n"; } if($tdisplay eq '3'){ if($tday eq "PM" && $hour < '12'){ $hour = $hour + 12; } print "$dline$hour:$min &nbsp\n"; } if($tdisplay eq '4'){ if($tday eq "PM" && $hour < '12'){ $hour = $hour + 12; } print "$dline$hour:$min:$sec &nbsp\n"; } # Debug Information Area. Turn it on above in the "Define user variables". if($debug eq '1'){ print "<strong>Debug Information --</strong>\n"; print "Second - $sec, Minute - $min, Hour - $hour, Day - $mday, Month - $mon, Year - $year, Y2K Year Fix - $yyear, Weekday - $wday, Year day - $yday , ISDST - $isdst, Auctal Month - $newmonth, Auctal Year - $newyear, Auctal Weekday - $wdisplay, AM or PM - $tday, Image Used - $image[$gtype], Greeting - $greet\n"; } print "</font></body>\n</html>\n"; exit; # --- That's It!
  5. You can setup a Live clock in DHTML: http://www.dynamicdrive.com/dynamicindex6/clock2.htm I'm just looking to see what I use for date
  6. I'm not sure why you think Dynamic Drive is too complicated - we use it all the time working with our Dreamweaver site builds. If you need a hand to install it then let me know and we'll help you get something installed Alan
  7. Hi I have used logmein.com on my son's dial-up connection and connected successfully from a broadband connection to sort out his problems so it might be worth installing that. Also Avast! has worked really well for him and updates on its own.
  8. Hi Nick I work extensively with Perl and have had similar problems. Generally I upload to TCH using SmartFTP with ASCII transfer set as default. However I have found that if I upload using the TCH control panel file upload I invariably get this error which means that it hasn't uploaded in ASCII. To get round this use the File Manager from your control panel - edit the script then immediately save it again and see if that works. I don't believe uploading scripts to TCH servers using the control panel really works properly. Download a copy of SmartFTP and upload using that.
  9. The PM file should be in a path relative to your script - although it is referred to as an HTML template chances are that it contains PERL code and so it is unlikely that it can be run from the HTML directory
  10. If you renamed a directory to DADA from dada then you probably need to call DADA in the address call. I have found that when calling anything in the cgi-bin it IS case-sensitive Hope that helps
  11. I am developing a script that will be activated automatically each time a new email arrives at a specified email address and process the data. I have seuceeded in getting the script (Perl) to run when the email arrives and as I track the emails sent from Outlook I get the standard notification to say that the email has arrived: --------------------------------------------------------------------------- This is an automatically generated Delivery Status Notification. Your message has been successfully relayed to the following recipients, but the requested delivery status notifications may not be generated by the destination. update@newhorizonz.net --------------------------------------------------------------------------------------- Now the problem is that although the script runs and I get emailed back my results I also receive a Mail delivery failed report which says that the script to which filter the email didn't could not receive the email (although it has because the email ran the script!!: --------------------------------------------------- This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: pipe to |/home/aisamcg/www/cgi-bin/testmail.pl generated by update@newhorizonz.net local delivery failed ------ This is a copy of the message, including all the headers. ------ Return-path: Received: from [195.188.213.5] (helo=smtp-out2.blueyonder.co.uk) by server68.totalchoicehosting.com with esmtp (Exim 4.34) id 1CAuzg-0002C2-KA for update@newhorizonz.net; Fri, 24 Sep 2004 14:40:32 -0400 Received: from NHOFFICE ([82.33.73.66]) by smtp-out2.blueyonder.co.uk with Microsoft SMTPSVC(5.0.2195.6713); Fri, 24 Sep 2004 19:41:04 +0100 Return-Receipt-To: "new Horizonz" Reply-To: From: "new Horizonz" To: Subject: test Date: Fri, 24 Sep 2004 19:40:41 +0100 Organization: new Horizonz Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_004F_01C4A26E.63196F10" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Disposition-Notification-To: "new Horizonz" X-OriginalArrivalTime: 24 Sep 2004 18:41:04.0170 (UTC) FILETIME=[0BCF10A0:01C4A266] This is a multi-part message in MIME format. ------=_NextPart_000_004F_01C4A26E.63196F10 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit test ------=_NextPart_000_004F_01C4A26E.63196F10 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable test ------=_NextPart_000_004F_01C4A26E.63196F10-- -------------------------------------------- Can anyon advise how I can stop the mail server reporting a delivery failure for this? Many thanks Alan
  12. I note in the Email Filtering setup on Cpanel that it appears possible to invoke a script or program via email by filtering incoming email to "|home/www/prog..." instead of discarding or forwarding it. Has anyone successfully achieved this? I have a need to have one email address which when a mail arrives will call a Perl script to process the contents of that mail. Any feedback would be appreciated
  13. What sort of login are you using? Does it set up a cookie on the PC logging in?
  14. Hi Lisa I have emailed you some more information.
  15. Why not use a guest book script and adapt it to what you need it to do?
  16. We have been using our own custom-built script to do exactly what you describe for some time now! What we tend to do however is to separate fields with the pipe '|' delimiter and the sub-fields with an exclaimation '!' Thus your records would look like: link1|fruit!apple!green link2|vegetable!carrot!orange link3|fruit!banana!yellow Then we read each record into an array: $field[0] = "link1" $field[1] = "fruit!apple!green" then split the sub-fields from $field[1]: $subfield[1] = "fruit" $subfield[2] = "apple" $subfield[1] = "green" and then commence the printout to screen Do you create the flat-file manually or via another perl script? If by a script you will need to change the method used to write the record to file replacing the commas with pipe or exclaimation. If you would like to send over the files / and any programs used to write the file (if any) then I will make the amendments and create an output script in perl for you. Also it would be a good idea to send a link to the site and a copy of the html pages to be be used for output so that I can adjust the perl output accordingly. Email is admin@newhorizonz.net Regards Alan
  17. Content deleted. Family Members may not use the Forum for commercial gain.
  18. On my previous server I used one domain to feed database info into a variety of client sites using the SSI includes - as the feeder domain was on the same virtual server I had no problems in connecting to the databases by relative addressing. Now I have moved my clients I need to reconnect to the databases using the EXEC CGI directive. I believe this has to be enabled in the access.cnf file. Will TCH allow this command to be used or does it present security issues?
  19. There are a couple of ways that you could run Newsletters. One method that one of my clients use is a Perl script that sends an email to the site owner and an acknowledgment to the user. The email address is then added manually offline to the YAMS program which can bulk email the newsletter when required. The other method would be to have a Perl Newsletter script that would handle the sign-ups and add the user to an online database. Let me know what option is better for you and I'll sort something out. Regards Alan
  20. Just wondering if anyone can help me with a problem I have in moving a small fully working Perl Script running on DSVR in the UK to TCH. I wrote a script some while back which reads one of 5 flatfile databases as determined by the parameter passed with the script call. These files contain property details which are simply formatted and displayed on screen. The program is currently running unde Perl V.5.6.1 successfully. On TCH under version 5.8.1 I am getting odd things crashing the script. The file layout is up to 9 fields per record. A record which has field 0 set to "Ftr" will print the next field (1) as a footnote. Field 0 set to "Hdr" will cause the next x fields to printed in table cells - the column headers. Anything else is a property record and each field is printed in the appropriate table column. The first problem I had was that the script uppercases all fields. In respect to "Ftr" records (where only 2 fields are populated) V.5.6.1 handled the blank fields without a problem. On v5.8.1 I get and error message "Can't Coerce UNKNOWN to uc in .........." Having commented out these lines the script now just crashes with Premature end of script headers........" Is there really a vast diference between the versions or is it simply that something else needs to be set up on TCH to run the script properly? I attach a zip file with the 3 script files used and would be grateful if anyone could assist. Thanks Alan files.zip
×
×
  • Create New...