Connetu_C
Privileged
-
Joined
-
Last visited
Reputation Activity
-
Connetu_C got a reaction from Jack in Recommend hosting with DDoS protection?It really depends on what attack vector(s) you have in play. If the attackers are targeting your port 80/443 and are truly distributed (coming from hundreds, thousands, tens of thousands of source IPs etc.) then identifying the malicious traffic amongst genuine becomes very problematic without expensive "intelligent" gear.
Also if the attack is of a size which is difficult to manage - e.g. multi-Gbps or multi-10Gbps - then some high throughput routing platforms and high capacity links are needed to mitigate.
If, on the other hand, someone is using a DNS amplification attack on you (from experience, this one is recently very common) - so you've just got UDP junk coming to port 53 - and that is within a manageable size, then your ISP can filter it for you (at their discretion and level of helpfulness of course). This costs nothing except if the attack is prolonged and racks up their upstream bandwidth bills... but usually attackers give up before then. It's usually in the ISP's interests to keep the junk off their core.
Unfortunately, seeing their attack is being successfully thwarted, sometimes attackers keep ramping the attack up after mitigation, which can cause the ISP (and its other customers) problems; then temporarily dropping the affected customer's service is the quickest way to restore stability across the entire network for all customers.
Do you have any further data on what your attack actually consists of and its size? That will probably tell you what sort of DDoS "protection" you need. We wrote a blog post on this very topic in February describing different approaches commonly taken - I've linked to it; hopefully it won't get censored.
-
Connetu_C got a reaction from WebSetGo in Secure Servers, Credit Card Details, Payment help.For low volumes, it'll be easiest if you use a third party payment provider like PayPal, MoneyBookers etc.
If you go down the road of doing this more in-house (lower cost per transaction), there are still a number of solutions. At a minimum you will need a Merchant Account with a UK provider (this is not the same as a commercial/business bank account) - this is the most difficult part as you may be declined due to risk. After you have a Merchant Account (or before setting it up), talk to several merchant payment service providers. These providers will collect the details on your behalf, via the merchant account, the latter who will (after a few days) then deposit the funds in your UK bank account.
Solutions with a payment service provider range from them hosting everything (much like PayPal, but depending on transaction volume with lower fees), to you hosting only an SSL payment page, to you hosting everything and only passing them API calls with transaction details.
Be aware that as you take more responsibility on yourself, you will need to become more stringent with PCI compliance - the industry standard for ensuring security of card acceptance. If you are doing any of the payment processing/hosting yourself, at a minimum you would need to complete a self-assessment questionnaire and pay for quarterly network scans.
In most cases it is simplest to either use a complete outsourced solution like PayPal, or to use a merchant provider's fully hosted solution, unless you require additional functionality not provided by either of those approaches.
-
Connetu_C got a reaction from gregmurkett in Secure Servers, Credit Card Details, Payment help.For low volumes, it'll be easiest if you use a third party payment provider like PayPal, MoneyBookers etc.
If you go down the road of doing this more in-house (lower cost per transaction), there are still a number of solutions. At a minimum you will need a Merchant Account with a UK provider (this is not the same as a commercial/business bank account) - this is the most difficult part as you may be declined due to risk. After you have a Merchant Account (or before setting it up), talk to several merchant payment service providers. These providers will collect the details on your behalf, via the merchant account, the latter who will (after a few days) then deposit the funds in your UK bank account.
Solutions with a payment service provider range from them hosting everything (much like PayPal, but depending on transaction volume with lower fees), to you hosting only an SSL payment page, to you hosting everything and only passing them API calls with transaction details.
Be aware that as you take more responsibility on yourself, you will need to become more stringent with PCI compliance - the industry standard for ensuring security of card acceptance. If you are doing any of the payment processing/hosting yourself, at a minimum you would need to complete a self-assessment questionnaire and pay for quarterly network scans.
In most cases it is simplest to either use a complete outsourced solution like PayPal, or to use a merchant provider's fully hosted solution, unless you require additional functionality not provided by either of those approaches.
-
Connetu_C got a reaction from henbast in UK VPS (cPanel) requiredIn my opinion, it depends. Example: we run most of our internal services virtualised (in a "cloud" as it were). Each VM is assigned its own 2GHz+ core and at least 1GB RAM. Aside from CPU cache misses, this works very well - better guaranteed resources for each application than on a shared server, and we ensure enough is available. We benefit from consolidation of hardware, power, wasted CPU cycles and RAM segments, improving efficiency.
In addition, files are cached by Linux in RAM - so it doesn't matter that the underlying hard drives are shared between VMs, as most static resources are being buffered in the VM RAM anyway, so are fast (much faster than dedicated hard drive in fact). Intensive disk I/O (usually very busy databases) is where VMs will bottleneck - for everything else they're usually as good, if not better (due to superior hardware), than a budget dedicated solution. Obviously if you're not paying for larger RAM allocations, that will decrease performance - RAM is basically the most important factor for a VPS with decent performance.
It's all highly dependent. To say VMs will never be speedy is relative as technology progresses: today's VMs (done right) are superior to the dedicated servers of 5 years ago.
-
Connetu_C got a reaction from AlecIsh in UK VPS (cPanel) requiredBecause there are so many around?!
Bear in mind that with your own server (VPS or dedicated), you are going to be responsible for maintaining that server - even though it may come installed with cPanel for daily administration. If something locks up (including cPanel itself), almost no providers will fix it for you - for the low prices, almost all VPSs you'll find are unmanaged, and expect to pay considerably more for managed. Don't forget a regular backup schedule too - don't expect your host to backup your VPS at all, or at least as regularly as you may require.
You also need to know what specifications of server you need, particularly with respect to CPU and RAM (disk space and bandwidth should be easy for you, taken from your existing hosting). If you get a VPS with too little RAM, expect your Web server and/or control panel to seriously struggle. Too little CPU, and your processor intensive/database sites will load slowly. Incidentally, this is rarely a problem on a dedicated server because of all the resources at your disposal, but obviously this is more costly.
My preference is for Xen or KVM virtual machines, and not Virtuozzo or OpenVZ - reason being that the latter impose awkward artificial constraints on number of open files, sockets, kernel memory and virtual memory. I've had Web and mail servers terminated inside OpenVZ containers before under heavy unexpected load - the same has never been true in Xen or KVM.
Those are just a few thoughts to bear in mind since you say "when it comes to hosting I am not the best", particularly since you want a quick fix. Either you need to find a company willing to assist you on a personal level (none of the big names will), or perhaps look at a more managed alternative like reseller shared hosting from a decent host?
Do you have a budget / what are you paying now for everything?
-
Connetu_C got a reaction from AlecIsh in Admin login securityIn many cases, assuming you trust your sysadmin, (salting and) hashing passwords is almost worthless... Why? Because a lot of programmers who do it use the same grant-all privileges user for everything on the entire database. Hashed passwords are designed to be kept in one low-level system so if they are exposed, they cannot be used to gain access to separate higher-level systems. But mostly they are stored in the same system/database - so if a "hacker" has access to the hashes, they already have access to your entire system/database, and there's probably a lot more in there that is more valuable than a few passwords. See the problem?
Don't get me wrong - hashes are good. But in so many cases I've seen, do nothing to actually improve security of your application. They do stop the sysadmin or a hacker from seeing people's actual passwords - which prevents them using them elsewhere to illegally access other accounts (like Facebook, Twitter, Amazon, eBay) where the user has used the same password. So definitely essential for your users' security - but useless for yours!
More likely weaknesses in your application include:
SQL injections: script vulnerabilities are used as an entry point to gaining easy access to your database.
Eavesdropping (man-in-middle attacks): easily used by hackers to gain access to your site, if it isn't using SSL certificates correctly. Any packets flowing over the network unencrypted will contain your users' passwords in plaintext, regardless of what hashing you do in the storage backend. That's far easier to intercept than passwords stored in your database.
Session "stealing" or "hijacking": whereby an interceptor learns of the unique (and secret) session ID given to a user and uses this to "take over" their session.
Brute force on database: if your database is running on an Internet-accessible port, brute force cracking becomes easier.
Lazy database privileges: accessing database under one (non-root) user allows complete access and control of all data.
Weak passwords chosen by users: allows easy dictionary attacks on your Web interface.
Solutions? Make sure your application is throughly hardened and tested, and implement HTTPS for all secured pages - the latter will also protect the session ID you have with the user, which prevents a "hijack". Make sure your database runs on localhost (or your own firewalled private network) only, so isn't accessible to the "outside", and implement a proper set of database users with varying privileges. Basically, give every connection only the privileges it requires to do its job. For users, enforce use of stronger passwords only to prevent dictionary attacks. Consider logging excessive failures from a single IP for investigation (in critical applications, they could be automatically firewalled from the entire network).
You can also use SQL stored procedures to help control what database actions are permitted by users. This is one step the "big boys" take to implement access control in databases. It also improves performance for multi-part queries, and makes injection attacks useless unless they call one of the "permitted" stored procedures (they have the know the procedure names for this to work).
Of course, as mentioned above, how far you go depends on the importance of your data, your budget and the time you can spend on it!
Just some ideas, hope you find that lot useful
-
Connetu_C got a reaction from Milli05 in Admin login securityIn many cases, assuming you trust your sysadmin, (salting and) hashing passwords is almost worthless... Why? Because a lot of programmers who do it use the same grant-all privileges user for everything on the entire database. Hashed passwords are designed to be kept in one low-level system so if they are exposed, they cannot be used to gain access to separate higher-level systems. But mostly they are stored in the same system/database - so if a "hacker" has access to the hashes, they already have access to your entire system/database, and there's probably a lot more in there that is more valuable than a few passwords. See the problem?
Don't get me wrong - hashes are good. But in so many cases I've seen, do nothing to actually improve security of your application. They do stop the sysadmin or a hacker from seeing people's actual passwords - which prevents them using them elsewhere to illegally access other accounts (like Facebook, Twitter, Amazon, eBay) where the user has used the same password. So definitely essential for your users' security - but useless for yours!
More likely weaknesses in your application include:
SQL injections: script vulnerabilities are used as an entry point to gaining easy access to your database.
Eavesdropping (man-in-middle attacks): easily used by hackers to gain access to your site, if it isn't using SSL certificates correctly. Any packets flowing over the network unencrypted will contain your users' passwords in plaintext, regardless of what hashing you do in the storage backend. That's far easier to intercept than passwords stored in your database.
Session "stealing" or "hijacking": whereby an interceptor learns of the unique (and secret) session ID given to a user and uses this to "take over" their session.
Brute force on database: if your database is running on an Internet-accessible port, brute force cracking becomes easier.
Lazy database privileges: accessing database under one (non-root) user allows complete access and control of all data.
Weak passwords chosen by users: allows easy dictionary attacks on your Web interface.
Solutions? Make sure your application is throughly hardened and tested, and implement HTTPS for all secured pages - the latter will also protect the session ID you have with the user, which prevents a "hijack". Make sure your database runs on localhost (or your own firewalled private network) only, so isn't accessible to the "outside", and implement a proper set of database users with varying privileges. Basically, give every connection only the privileges it requires to do its job. For users, enforce use of stronger passwords only to prevent dictionary attacks. Consider logging excessive failures from a single IP for investigation (in critical applications, they could be automatically firewalled from the entire network).
You can also use SQL stored procedures to help control what database actions are permitted by users. This is one step the "big boys" take to implement access control in databases. It also improves performance for multi-part queries, and makes injection attacks useless unless they call one of the "permitted" stored procedures (they have the know the procedure names for this to work).
Of course, as mentioned above, how far you go depends on the importance of your data, your budget and the time you can spend on it!
Just some ideas, hope you find that lot useful
-
Connetu_C got a reaction from Renaissance-Design in Database planning - Looking for tipsYou may want to use foreign key constraints - but you can only do this if you create the tables with the InnoDB engine, rather than the default MyISAM. InnoDB also has a proper implementation of transactional sessions and the benefits of row-level (rather than table-level) locking.
Foreign keys are useful in relational databases. For example, say you have catalogue items in various categories, then FK constraints enforce the "sensible" rule that you cannot delete a category if there are items still remaining in it.
Another scenario is establishing a hierarchy of tables - for example, you have a generic Items table listing all your catalogue items, and various specific subtables which provide supplementary information, like Books which contains ISBN number, author and title fields. A FK constraint can be imposed so that if you delete the item from the Items (parent) table, then the same entry (identified by matching foreign key) in the Books (child) table is also removed automatically.
Depending on what you're doing, FKs may be useful.
-
Connetu_C got a reaction from StuartPB in Database planning - Looking for tipsYou may want to use foreign key constraints - but you can only do this if you create the tables with the InnoDB engine, rather than the default MyISAM. InnoDB also has a proper implementation of transactional sessions and the benefits of row-level (rather than table-level) locking.
Foreign keys are useful in relational databases. For example, say you have catalogue items in various categories, then FK constraints enforce the "sensible" rule that you cannot delete a category if there are items still remaining in it.
Another scenario is establishing a hierarchy of tables - for example, you have a generic Items table listing all your catalogue items, and various specific subtables which provide supplementary information, like Books which contains ISBN number, author and title fields. A FK constraint can be imposed so that if you delete the item from the Items (parent) table, then the same entry (identified by matching foreign key) in the Books (child) table is also removed automatically.
Depending on what you're doing, FKs may be useful.
-
Connetu_C got a reaction from PixelPure in Group Buying site, what hosting to go for?"Cloud" hosting is a tricky one, because it's often misused (abused?) as a marketing slogan. In my opinion, true "cloud" hosting means separating data storage from processing, and billing everything as a utility - i.e. in units of processing, bandwidth and storage consumed per minute or hour. The advantages of "clouds" are supposed to be increased performance, resiliency and ease of upgrade - but your mileage on this will vary depending on who the cloud provider is. Many hosts sell simple "VPS" or "VDS" solutions as clouds, when really they are neither billing as a utility, nor have central storage (instead, your data is on the hard drive in the same box as the computational node). Clouds tend to be more expensive than a "simple" VPS solution, because of the benefits of utility billing and easier upgrade routes.
In general, it should be easy to upgrade the CPU allowance and/or RAM on any virtual solution. However, by their nature, a virtual solution is shared. If your project really takes off, you will probably want to move to a dedicated solution so you aren't sharing network ports and I/O channels.
A dedicated server is pretty easy to upgrade in terms of bandwidth, RAM or CPU - the latter involves taking the hard drives out of one chassis and putting them in another... a 20 minute job, but straightforward. We've done them in late evenings/overnight before, to minimise disruption for clients.
Moving from a virtual solution to a dedicated server is doable but isn't trivial - you essentially have to clone one to the other, but have possible issues to overcome with drivers, partition sizes etc. The ease also depends on the OS (generally it's easier to do complex things with Linux than Windows).
Also, bear in mind that with any dedicated server or virtual server solution, you can run as many websites as you like on it... you have full control, so can be sure no other sites are unknowingly slowing yours down. It can be a good financial move to consolidate any existing sites, if you have any, on to a single dedicated box
-
Connetu_C got a reaction from frupence in Run function from variable PHPCould it be a lack of end of line terminator (semi-colon) inside the eval? E.g.:
$bar = 'doSomething(4);';
Just a thought.
Or you could equivalently do:
eval("aClass::{$bar};");
Also, you might want to declare the class method as "public static function doSomething($foo)" otherwise it's an instance method and can only be invoked on an object, not on the class itself.
-
Connetu_C got a reaction from taylor223 in host speedInitial connection time depends on various factors, but mostly a combination of how the Web server has been tuned, and how the scripts are programmed. For example, if you use CGI (e.g. for Perl or Python), every request starts a new process and this overhead increases connection time. Similarly, starting a PHP interpreter to compile each PHP page on every request incurs time. In terms of execution speed, going to FastCGI, pre-compiled code and caching systems is going to be quite noticeable, as will optimising database queries (another frequent bottleneck). Other factors to consider are tuning the Web server for number of concurrent users, number of child processes kept around and what each process does (and holds in memory). In a typical Apache prefork model with PHP, every process has an internal PHP interpreter and this adds overheads even for non-PHP files.
We found that using a PHP server for static resources (like images, JavaScripts and stylesheets) increased connection times. As soon as we separated scripts from static content, and started using static servers optimised for disk-network file copies, the sites loaded so much faster. There's also the benefit of parallel concurrent HTTP connections this way.
In a shared hosting environment, you aren't going to be able to tweak the settings for your exact needs - there has to be a balance of tuning which works out as "good for everyone" rather than "excellent for you". You're also either not pooling or are sharing database connections (from a finite pool), and are contending for disk access, bandwidth etc. If load speeds are really essential and you can't optimise your scripts further, consider a more dedicated environment so you can tune the performance.
-
Connetu_C got a reaction from SniderDK in Classes QuestionNot quite - $this is a reference to the current object - i.e. an instance of the class you defined. You can think of a class a bit like a template which is then populated with specific data to form an object. Each time you want to create another instance of the template (class), you use the "new" keyword and create a new object... then populate the object with the specific data you want to.
$this->message therefore refers to the "message" variable/field of the current object. You don't store data in variables in classes (since these are just "templates"), but instead in fields/variables of objects which are instances of the class.
As for why you use $this->message rather than $message, this is just PHP syntax and "is the way it is"! $message might refer to a method-local variable rather than the field in the object, hence $this-> is a disambiguator. In other OO languages (e.g. Java and C++) you can use just the variable name without a "this" reference, in which case the compilers figure out you meant the object-scoped variable and insert an implicit "this" for you.
Hope that helps
-
Connetu_C got a reaction from andy9l in Classes QuestionNot quite - $this is a reference to the current object - i.e. an instance of the class you defined. You can think of a class a bit like a template which is then populated with specific data to form an object. Each time you want to create another instance of the template (class), you use the "new" keyword and create a new object... then populate the object with the specific data you want to.
$this->message therefore refers to the "message" variable/field of the current object. You don't store data in variables in classes (since these are just "templates"), but instead in fields/variables of objects which are instances of the class.
As for why you use $this->message rather than $message, this is just PHP syntax and "is the way it is"! $message might refer to a method-local variable rather than the field in the object, hence $this-> is a disambiguator. In other OO languages (e.g. Java and C++) you can use just the variable name without a "this" reference, in which case the compilers figure out you meant the object-scoped variable and insert an implicit "this" for you.
Hope that helps
-
Connetu_C got a reaction from Jock in Regex for A-Z0-9 onlyWell it's all to do with PHP's loose typing: in PHP, a variable can be of any data type and will "coerce" between that and any requested type automatically. For example, if you have an integer $i = 10 and a string $s = "Number " then you do $s + $i, the integer is coerced automatically into a string "10" and then concatenated "Number " + "10" to give the string "Number 10".
Similarly, if you do:
$i = 20; if($i) { // this is only executed if $i is non-zero // if $i is zero, it is coerced to FALSE for the if statement }
There's loads more on the PHP pages: PHP Type Juggling.
The problem is that things like "0"==0 return true because PHP coerces the string "0" to an integer 0 and then 0==0 is true. But is the string "0" really equivalent to an integer? I would say not, and in a strictly-typed language you would get a compilation error.
The === operator does check for type as well as value. So 0===0 is true because both are integers and both are zero, but "0"===0 is false because "0" is a string and 0 is an integer, so they aren't identical "things".
Unfortunately, PHP then gets all caught up in its own type coercion mess and sometimes things don't work as any of us think they should. In your example, the return type from preg_match can be either an integer (number of matches, 0 for none) or the boolean FALSE (if an error occurred). In theory, PHP should coerce a 0 response to the boolean FALSE, apply the inversion ! and get true and hence evaluate your block... but this wasn't working (perhaps it got confused with the possible FALSE return value - I don't know).
The preg_match(...)===0 is only evaluated if preg_match genuinely returns the integer 0, and ignores the case when it could be FALSE entirely (since FALSE is not identical to 0 in the strict sense).
-
Connetu_C got a reaction from Jem in PHP function help (Greatest Common Factor)What you've described is the Euclidean algorithm, one of the most fundamental parts of number theory. It has quite a few surprising applications (including proving that prime factorisation is unique, as well as being an essential part of RSA cryptography - used in SSL/TLS). If you want to understand why the modular part is required, you need to read more about its background and run through the worked example there.
Note that your function uses recursion to repeatedly call getGCF(). For large numbers this can be inefficient as it means new function calls keep being pushed on the stack. You can also implement the algorithm with a while loop, which is preferable.
-
Connetu_C got a reaction from woodsytime in PHP include with images not working?Of course! How about this:
switch ($service) { case "virus_removal": case "internet_setup": case "computer_security": case "website_design": case "hardware_software_installation": case "pc_mot": case "data_backup": case "data_recovery": case "video_phone_pc": case "trouble_shooting": echo '<img src="/resources/images/services/$service.png" alt="alt text" />'; break; default: echo '<img src="/services/services_intro.png" alt="alt text" />'; break; }
You might also find it more concise (purely personal taste) to write:
$known_services = array("virus_removal", "internet_setup", "computer_security", "website_design", "hardware_software_installation", "pc_mot", "data_backup", "data_recovery", "video_phone_pc", "trouble_shooting"); if(in_array($services,$known_services)) { echo '<img src="/resources/images/services/$service.png" alt="alt text" />'; } else { echo '<img src="/services/services_intro.png" alt="alt text" />'; }
-
Connetu_C got a reaction from woodsytime in PHP include with images not working?When you look at the HTML source code generated inside the browser, what URL do you see for the images? Where do the images actually reside?
The fact you can't see them is probably caused by the images not existing at the URLs - you need to put your images in a publicly-accessible directory in your domain (e.g. /images) and alter the URL prefixes in the PHP appropriately (since I don't know where they actually are, I had to guess). And yes, apologies, that should have been $service and not $services.
I also note that previous you were using "services/service_intro.png" and "resources/images/services/" as relative paths. This isn't advisable (in case you move your script or reuse the code for other paths). I'd suggest altering these to the appropriate absolute paths (which are always relative to the hostname and not the current page) which begin with a /.
-
Connetu_C got a reaction from sobredosis de amor in server side postYou're told you can't use HTTPS and things like IP access lists can be by-passed by spoofing. Also note you're not being asked for data security (encryption), just integrity (data not modified by man-in-middle). I know how I'd accomplish this, but since this is homework assignment or similar I won't tell you the answer. However, hint: shared secret key. And yes, MD5 or SHA1 could be useful in the toolkit too.
-
Connetu_C got a reaction from BlackMagic in server side postYou're told you can't use HTTPS and things like IP access lists can be by-passed by spoofing. Also note you're not being asked for data security (encryption), just integrity (data not modified by man-in-middle). I know how I'd accomplish this, but since this is homework assignment or similar I won't tell you the answer. However, hint: shared secret key. And yes, MD5 or SHA1 could be useful in the toolkit too.
-
Connetu_C got a reaction from Martin Greenwood in Not receiving emails to my domain account via PHP contact form...You don't put the -f parameter in front of all the e-mail addresses passed to mail()! This is an option to the sendmail program usually used by PHP mailer and would only appear as the fifth argument to mail(). Try these changes:
$EmailFrom = "martin@mcgdesignstudio.com"; $EmailTo = "martin@mcgdesignstudio.com"; // snip $success = mail($EmailTo, $Subject, $Body, "From: $EmailFrom","-f$EmailFrom");
Does that work for you? You shouldn't need the fifth parameter in most cases as it can be derived from the fourth by PHP, but at least this should now work.
-
Connetu_C got a reaction from JamesW in Help with Array inside LoopA quick glance would make me believe you don't want to re-assign the $shuffle array each time inside the loop. This is basically clearing out the array on each iteration before adding that iteration's $v to the (new) array. Hence by the time the loop finishes, only the last $v has been added (to the new and empty array that was created in that iteration). If you see what I mean?!
Anyway, to fix it, delete the line:
$shuffle = array();
and place it instead before and outside the loop, like this:
$shuffle = array(); while($row = mysql_fetch_array($result))
Does that solve (and importantly explain) it for you?
-
Connetu_C got a reaction from skidz in detecting if an email as been openedIt's very difficult to detect when an e-mail has been opened since that happens on the client-side. In the past, examples would include a return receipt (which now tend to be disabled or blocked from being sent) or an image in an HTML e-mail which had its "src" coded to include some key (e.g. MD5 of the e-mail address) so when that image was loaded in the e-mail, the server could detect who had opened it. Of course, this quickly became abused so now many mail clients block linked images unless the user specifically permits them to be fetched and displayed.
One other way which seems quite common is to provide an HTML view which contains such an image, and also a plain-text link to a webpage containing the same newsletter. So either they choose to load the HTML view (and one of the loaded images will contain the unique ID for tracking purposes), or they can go to the identical webpage which has the unique ID built into the URL.
With regards to detecting blocked e-mails, there are two stages at which an e-mail can be blocked: at your application's sending stage (e.g. the SMTP server may be down or unable to forward mail for the supplied domain), or when your SMTP server attempts to deliver to the destination/next hop (e.g. because the mailbox does not exist or your IP is banned). In the former case your script should immediately become aware of the failure. In the latter case, you may (but won't necessarily) receive a bounce e-mail from your delivery SMTP server back to the Reply-To telling you that delivery was unsuccessful for whatever reason. Not all servers are configured to send bounce e-mails, particularly if your e-mail was binned as spam or the recipient does not exist - the lack of bounce messages is designed to counter spammers who forge sender addresses and try brute force approaches to random address bulk mailing.
If you are successful in getting bounce messages from some clients, you should be able to use POP or IMAP functions to scan the inbox (at the account to which bounces are delivered) for such notifications and take appropriate action. You might find it more convenient to run this from a script or executable as a scheduled task (e.g. cron job), rather than via a PHP/ASP page. You can of course program it in PHP/ASP and then use cron to regularly invoke that URL, if you don't have usage of other script types.
-
Connetu_C got a reaction from ElanMan in MySQL securityOn a properly configured machine, it is sufficient only for you to ensure your database login details are safely tucked away. Because your database is locked down to TCP localhost only (or uses UNIX domain sockets), MySQL will reject connection attempts from outside the same machine, and further will not pass any traffic over the network which could be packet sniffed. However, anyone on the same machine (i.e. if you're using shared hosting) could compromise your database if they discover your login details. In theory, anyone on the same machine could also packet sniff (intercept and/or modify) localhost data to discover your login details, all executed queries and response data. However, this functionality would require root permissions and should be impossible on a properly configured server. So you should have no problems with data integrity.