Jump to content
xisto Community

TavoxPeru

Members
  • Content Count

    865
  • Joined

  • Last visited

Everything posted by TavoxPeru

  1. Believe it, the search industry giants Google, MSN, and Yahoo works together to bring us a new SEO tool, sitemaps.org, this is a webmaster protocol that is attempting to introduce a web standard for these documents. You know it, sitemaps are simple XML documents that webmasters use on their sites, this documents simply tells search engines which pages on their sites are available for crawling, remember, this doesnt means that your sites are included in search engines but it can helps search engine web crawlers do a better job when crawling your website. For more information please visit: sitemaps.org Best regards,
  2. Congrats, excellent and well explained information, but i have a question, in some cases you dont have access to any statistical software or your hosting provider dont install any kind of this software, is there exists an easy way to get this data from the server and process it locally????Best regards,
  3. Well i dont know if it is possible to do it but what i know is that it is a bit difficult to use cron jobs with php, may be i'm wrong.Best regards,
  4. Well, a few months ago i need the same functions exactly for the same reasons as you and lucky me i found this php code but i dont remember where i found it so i hope it helps you. <?phpfunction datediff($interval, $datefrom, $dateto, $using_timestamps = false) { /* $interval can be: yyyy - Number of full years q - Number of full quarters m - Number of full months y - Difference between day numbers (eg 1st Jan 2004 is "1", the first day. 2nd Feb 2003 is "33". The datediff is "-32".) d - Number of full days w - Number of full weekdays ww - Number of full weeks h - Number of full hours n - Number of full minutes s - Number of full seconds (default) */ if (!$using_timestamps) { $datefrom = strtotime($datefrom, 0); $dateto = strtotime($dateto, 0); } $difference = $dateto - $datefrom; // Difference in seconds switch($interval) { case 'yyyy': // Number of full years $years_difference = floor($difference / 31536000); if (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom), date("j", $datefrom), date("Y", $datefrom)+$years_difference) > $dateto) { $years_difference--; } if (mktime(date("H", $dateto), date("i", $dateto), date("s", $dateto), date("n", $dateto), date("j", $dateto), date("Y", $dateto)-($years_difference+1)) > $datefrom) { $years_difference++; } $datediff = $years_difference; break; case "q": // Number of full quarters $quarters_difference = floor($difference / 8035200); while (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom)+($quarters_difference*3), date("j", $dateto), date("Y", $datefrom)) < $dateto) { $months_difference++; } $quarters_difference--; $datediff = $quarters_difference; break; case "m": // Number of full months $months_difference = floor($difference / 2678400); while (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom)+($months_difference), date("j", $dateto), date("Y", $datefrom)) < $dateto) { $months_difference++; } $months_difference--; $datediff = $months_difference; break; case 'y': // Difference between day numbers $datediff = date("z", $dateto) - date("z", $datefrom); break; case "d": // Number of full days $datediff = floor($difference / 86400); break; case "w": // Number of full weekdays $days_difference = floor($difference / 86400); $weeks_difference = floor($days_difference / 7); // Complete weeks $first_day = date("w", $datefrom); $days_remainder = floor($days_difference % 7); $odd_days = $first_day + $days_remainder; // Do we have a Saturday or Sunday in the remainder? if ($odd_days > 7) { // Sunday $days_remainder--; } if ($odd_days > 6) { // Saturday $days_remainder--; } $datediff = ($weeks_difference * 5) + $days_remainder; break; case "ww": // Number of full weeks $datediff = floor($difference / 604800); break; case "h": // Number of full hours $datediff = floor($difference / 3600); break; case "n": // Number of full minutes $datediff = floor($difference / 60); break; default: // Number of full seconds (default) $datediff = $difference; break; } return $datediff;}//echo datediff('d','9/7/2006','12/7/2006') //this will return the interval of day between the 2 days?>Best regards,
  5. Hi, In my case cPanel shows that i have MySql version 4.0.27-standard but according to phpMyAdmin i have 4.0.26-Max, its very strange, may be an admin can tell us why exists this differences. Best regards,
  6. If your variable is coming from a form i reccomend you to cast it before you use it, its simple:$item_1_qty = (int) $_POST['item_1_qty'];Also take a look to the is_numeric() php function, because it is recommended to use it with variables that are submited by a form. Best regards,
  7. Hi, phpSitemapNG is a free php script that creates sitemaps that can be used with the google webmaster tools, it is very powerful and easy to setup and use, and if you have a google acount it also can submit your new sitemap created to google. It can be downloaded from http://enarion.net/tools/phpsitemapng/ I dont know if this is the correct place to post, so, admins, please relocate it to the correct place. Best regards,
  8. Well, yes it was a good idea at its moment, right now is old news, and as Aka_bar i also had heard about it around a year ago.Best regards,
  9. Well well, only to say that i just register to HANDYPHP.COM and i see that you have good php resources, i hope that in the future i can contribute with your site. Best regards,
  10. Thanks for the links, very useful both of them and i just bookmark for future references. Best regards,
  11. You are right if done properly it will install properly but this doesnt means that it will work properly and based on my experience i really dont recommend this SMTP server because it is a bit difficult to admin and use it. Can you please show us or post an URL to view how you do it??? i think that it will be very helpful for many people. Best regards,
  12. Hi, I use my space at http://forums.xisto.com/no_longer_exists/ for: debug web applications that i develop for my customers. test any kind of scripts (javascript, php, etc.) i found. investigate all the funtionallity of the CPanel web admin. store any kind of data i need to access everywhere. Right now my site is under construction so you cant find any thing at my frontpage, but if you wish you can view my Trivia Script i develop. Best regards,
  13. First time i hear about this mail server, for a while i use the Argosoft Mail Server as i said in a previous post with good results, i search it to download and will test it to see how fine it works. Two things i like are that it is opensource and second the fact that this mail server uses a database to store and saving data. Here you can find the hMailServer Best regards,
  14. Well, I understand and agree with the reasons you expose for hostings to do that to control spamming, but why this situation doesnt happens with the mailman that runs mailing lists??? is there a limit of how many emails one mailing list can have???? Best regards,
  15. Well, i use a database to store my mailing list and its about 3000 records right now, and to send it i do the same thing as you, but i noticed that this doesnt work because no mail is send and also i test it with a little list of 10 records, so i gonna try the use of an array instead maybe this way it works. Best regards,
  16. Yes, you can do this with phpmyadmin, you can do it with the import option if you first export your database as a sql file, take care with your databases charsets and versions, you can found some trouble with it. Best regards,
  17. Ok, no problem. Best regards,
  18. Tell me something, which software do you use to send mass emails??? i'm looking for a good one to do this because i test some with bad results Best regards,
  19. I agree with seec77, i just test it and this ¿¿¿software??? do not offer any advantage over a local installation of phpMyAdmin.Best regards,
  20. Well sherif, i dont use any kind of linux distro neither xampp, but i think the problem is related with the way your php is installed as i said you in my email, does your php is installed as cgi or as an apache module??? Best regards,
  21. TavoxPeru

    Timeout?

    Yes there are, the php function set_time_limit and the php.ini configuration setting max_execution_time, both controls how much time in seconds a script can run, if your script reach this value it produces a fatal error, the default value is of 30 seconds or, if it exists, the max_execution_time value defined in the php.ini, you can set this value to zero with the set_time_limit function, so no time limit is imposed and your script runs indefinitely. The other setting that you take in mind is the php.ini configuration setting max_input_time, that sets the maximum time in seconds a script is allowed to parse input data, like POST, GET and file uploads. Other considerations to take in mind are the maximum size of your uploading files, you control this by using in your uploading form a hidden input named MAX_FILE_SIZE and setting its value property to the maximum size allowed in bytes for your uploading files. If you use this, you must put it before your input file control, for example, the following allows to upload a file of maximum 2Mb: <input type="hidden" name="MAX_FILE_SIZE" value="2097152"><input type="file" name="upload" size="30">Also, in your script you can verify if your script receives a file and if it does not exceeds your maximum file size you define in your uploading form by checking the size of your uploading file control with the following: if( ($_FILES['upload']['size'] == 0) ){ die("Error... Your file exceeds the maximum file size allowed"); exit(); }Best regards,
  22. I dont completely understand your task, but, why you dont do 2 selects for this, the first one select the last 12 records of type P and then select the last record of type M, something like this:// obtain the last 12 records of type P$result=mysql_query("select * from table where table.type='P' order by table.id DESC limit 12") or die(mysql_error());// rest of your code// obtain the last record of type M$result=mysql_query("select * from table where table.type='M' order by table.id DESC limit 1") or die(mysql_error());// rest of your codeBest regards,
  23. I assume that you are running your own webserver locally right???? well, this problem is because in windows you dont have a mail server installed by default -well not on the non server versions- you use a smtp server to send your mails like the one that comes with the IIS package, so, if i'm correct you have 2 options: Install and configure the SMTP server of the IIS package. Download, install, configure and run one free mail server like ARGOSOFT, download here. A few months ago, i try this last one, its very easy to install and configure also very simple to administer, and even it works with Dynamic DNS, so if you have a broandband connection at home you can use it as your mail server too. Best regards,
  24. Well, while i'm searching other information i just found this excellent topic, congrats, its very helpful and simple, so, i gonna implement it right now in a project that im working on.Best regards,
  25. Well, for me MySql is better than ms access and i recommend you to use it, some reasons why: Is open soUrce More stable Much easy to learn Lot of support The space of your databases are smaller, etc. Best regards,
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.