Jump to content

nadeemshafi9

Members
  • Posts

    1,245
  • Joined

  • Last visited

Posts posted by nadeemshafi9

  1. Hi guys

     

    I am using Mail_mime attachments for the first time, my emails are arriving with the data instead of the icons i am sure i am doing it right i followed the manual, i am sending base64 encoded data files contents from a database along with there content type and disposition, i have specified this in Mail_mime. We don't use camel case here, should i be using Mail_mime getMessage  or get.

     

    <?php
    while($recipient = mysql_fetch_array($recipient_rs)){
    		$attachments_rs = $this_attachment->get_all_email_attachments($this_email->email_id);
    		while($attachment = mysql_fetch_array($attachments_rs)){
    			// attachment
    			if(!$this_mail_mime->addAttachment(
    				$attachment['attachment_attachment'], 
    				$attachment['attachment_contenttype'], 
    				'filename', 
    				false, 
    				'base64', 
    				'attachment', 
    				'UTF8', 
    				'English',
    				''
    			)){
    				echo "Fail: this_mail_mime->addAttachment";
    			}
    		}
    		// recipient
    		$recipient = $this_mail_mime->encodeRecipients($recipient['recipient_email']);
    		// HTML
    		if(!$this_mail_mime->setHTMLBody($this_email->email_html)) echo "Fail: this_mail_mime->setHTMLBody";
    		// Text
    		if(!$this_mail_mime->setTXTBody($this_email->email_text, false, true)) echo "Fail: this_mail_mime->setTXTBody";
    		// Headers 
    		$headers = $this_mail_mime->headers();
    		// Body
    		$body = $this_mail_mime->get();
    		// Send
    		$this_mail->send($recipient, $headers, $body);
    	}
    ?>
    

     

    The email is delivered looking like this

     

    --=_c5315d2ba2c73c11d0eb41f3c2e6a43f

    Content-Type: multipart/alternative;

    boundary="=_aa7e3304f426f2a0d91d8bf6815d92d8"

     

    --=_aa7e3304f426f2a0d91d8bf6815d92d8

    Content-Transfer-Encoding: 7bit

    Content-Type: text/plain; charset="ISO-8859-1"

     

    hiyahiya

    --=_aa7e3304f426f2a0d91d8bf6815d92d8

    Content-Transfer-Encoding: quoted-printable

    Content-Type: text/html; charset="ISO-8859-1"

     

    hiya

    --=_aa7e3304f426f2a0d91d8bf6815d92d8--

     

    --=_c5315d2ba2c73c11d0eb41f3c2e6a43f

    Content-Transfer-Encoding: base64

    Content-Type: image/jpeg;

    name*="UTF8'English'filename";

    Content-Disposition: attachment;

    filename*="UTF8'English'filename";

     

    LzlqLzRBQVFTa1pKUmdBQkFRRUFZQUJnQUFELzJ3QkRBQVlFQlFZRkJBWUdCUVlIQndZSUNoQUtD

    Z2tKQ2hRT0R3d1FGeFFZR0JjVUZoWWFIU1VmR2hzakhCWVdJQ3dnSXlZbktTb3BHUjh0TUMwb01D

     

    This goes on forever ......

     

    o=

    --=_c5315d2ba2c73c11d0eb41f3c2e6a43f

    Content-Transfer-Encoding: base64

    Content-Type: image/jpeg;

    name*="UTF8'English'filename";

    Content-Disposition: attachment;

    filename*="UTF8'English'filename";

     

    LzlqLzRBQVFTa1pKUmdBQkFRRUFZQUJnQUFELzJ3QkRBQVlFQlFZRkJBWUdCUVlIQndZSUNoQUtD

    Z2tKQ2hRT0R3d1FGeFFZR0JjVUZoWWFIU1VmR2hzakhCWVdJQ3dnSXlZbktTb3BHUjh0TUMwb01D

     

    This goes on forever ......

     

    --=_c5315d2ba2c73c11d0eb41f3c2e6a43f--

     

     

    Any ideas ? remember first time use.

     

    Thanks

     

    http://pear.php.net/package/Mail_Mime/docs/latest/Mail_Mime/Mail_mime.html

     

    http://pear.php.net/package/Mail/docs/latest/Mail/Mail.html

  2. People that make web applications for companies like Pipex internet in connection with there ISP users database make a mockery of internet applications and i want to be more precise than them, there systems are in complete malfunction and they don't even know, they have had a database move or application change and they have lost my status and i am getting free broadband, i even told them they said your lines canceled i said i am getting broadband they said don't worry all there people are crap and i hate crappies and i hope they fall one day they don't deserve to be a company ISP there standards have become too low after joining Tiscaly.

     

    So i am looking at these big corps and i see its the little things that count, i go into Starbucks and there people are so polite and there coffee tastes so good and there food is soo good and there things so good, so i am like i don't mind paying £3 a coffee every day.

  3. So what's the point of this thread? 

     

    Are you asking us if we think you should type in proper English...?  Of course we do.

     

    You should regardless, unless you want to be a "stupid person".  If you get a job you won't be able to write like that, speak like that, or act like that.  You should always type and speak properly so everyone can understand you.  It's kind of like being up to the w3 validation, it just makes everything easier and up to the standard.

     

    You can still be "stupid" and speak proper English, and vice versa.

     

    I have got a job, i have been a pure LAMP JS developer for 1 year and 4 months i have a first class in net science, the reason i am saying i want to make sure i type proper all the time is i don't want to accidentally put lol or something like that into a business related email one day that would be bad, and at that point i would feel my standards drop. Thing is theres a problem here i type all day long to my mates on MSN all day long in this hyper text.

     

     

    I can program JavaScript and PHP on MYSQL Apache very well now after 1 year and a few months of working with it every day for 8 hours, my CSS and HTML is solid and i use PEAR and JQuery all the time to code with but have started from the bottom eg making my own frameworks and actually implementing them, after a while i took on JQuery and PEAR when i realized how easy the same tasks were AJAX calls and DOM calls or emails with attachments, i also have the framework backward engineering with use of the manual of MediaWiki and that means i can use Drupal. I also have done projects for university in:

     

    *C

    *C++

    *Java

    *ADA

  4. Oh....

     

     

     

    I don't mean this as an insult to you, but I usually assume people are stupid when they type incoherently.  Also, it doesn't take much more time to properly punctuate and spell.  What ever floats your boat though.

     

    Yeah, no your right, they are but stupid people are fun and live on the edge so its fun to be one of them sometimes and mix into the crowd and have some fun with them. What would the world be without stupid people it would be no fun, we would have nothing to talk about, every outing would be boring. I have come to the conclusion stupid people are fun to experience, if u know how to handle them they can be tamed, lets face it there are a lot more stupid people in the world so why deny a majority why not embrace them.

     

    Without stupids we would have no fun media on the net, stupids are fun to watch listen to, some of there words are cool too no denying that, if stupids went smart and everyone was a grammatically correct programmer we would be bored to extinction, we all have a bit of stupid in us.

  5. Just of curiosity, what were the advantages of not speaking proper English?  What kept you from having this revelation sooner?

     

    I kept saying to myself these fogies keep telling me to conform and i am a non conformist rebel at some times trying to be free and have fun and do things the way they feel right, when they told me to write proper i just wanted to show them a glimpse of how English is written and spoken in England by English people every day. When u type lightning speed words are written as they sound in the shortest possible way, to be honest i usually write my messages at lightning speed hit the submit and keep working on my project i always check back but usually by then i have done the work rarely i need the answer from php freaks but its all part of the research process.

     

    I will still type iv instead i have and things like that.

     

    It is much more fun to read new words written in funky ways.

  6. because urdu is a so many languages i can understand, alot of dialects i dint even ask i was born into it, anyways most eastern languages both talk and write from right to left oposite to english, but URDU has a combination of ways of speaking from left to right or from right to left eg.

     

    app ka naam kia heh -- you (politness) name what is

     

    app kidder jah reh ho -- you where go (present tense) (direction)

  7. I usually write very slang style MSN type vocabulary on http://phpfreaks.com but now i realize that:

     

    1. This is unhelpful to search engines

    2. It is very unhelpful to people who don't speak English as there first language

    3. It can be very ambiguous in meaning and that is the whole point of software engineering to eliminate ambiguity.

     

    http://en.wikipedia.org/wiki/Internet_slangInternet Slang, 27/01/09, wikipedia - David Crystal—likening the introduction of LOL, ROFL, and others into spoken language in magnitude to the revolution of Johannes Gutenberg's invention of movable type in the 15th century—states that this is "a brand new variety of language evolving", invented by young people within five years, that extend the range of the language, the expressiveness [and] the richness of the language.

     

    http://en.wikipedia.org/wiki/Internet_slang, 27/01/09, wikipedia - Laccetti (professor of humanities at Stevens Institute of Technology) and Molsk, in their essay entitled The Lost Art of Writing, are critical of the acronyms, predicting reduced chances of employment for students who use such acronyms, stating that, "Unfortunately for these students, their bosses will not be 'lol' when they read a report that lacks proper punctuation and grammar, has numerous misspellings, various made-up words, and silly acronyms." Fondiller and Nerone in their style manual assert that "professional or business communication should never be careless or poorly constructed whether one is writing an electronic mail message or an article for publication, and warn against the use of smileys and these abbreviations, stating that they are "no more than e-mail slang and have no place in business communication.

     

    So i pledge to write proper grammatically correct English and spell check, this is made easy for me as i have the superior OSX environment which facilitates spell checking directly in this text box.

     

    It can be argued that web application specifications are more ambiguous than system software specification because of the rapidity of there changing requirements and the cost effectiveness of there initial specification engineering.

     

    What are your thoughts ?. I would love to hear peoples opinion on specifically web application specification engineering and the amount of ambiguity they have in there web application specs, you can throw in your two cents on internet slang and its place in the world.

     

    My second language is Urdu http://en.wikipedia.org/wiki/Urdu.

     

    Urdu is often contrasted with Hindi, another standardised form of Hindustani. The main differences between the two are that Standard Urdu is conventionally written in Nastaliq calligraphy style of the Perso-Arabic script and draws vocabulary more heavily from Persian and Arabic than Hindi,[9] while Standard Hindi is conventionally written in Devanāgarī and draws vocabulary from Sanskrit comparatively more heavily. Some linguists nonetheless consider Urdu and Hindi to be two standardized forms of the same language; however, others classify them separately due to sociolinguistic differences.

     

    Urdu is a combination of Persian, Arabic, Turkic, Mongolian, Sanskrit, English, the persio-arab script can be used to express words from any place in trhe world but is too complex for print or keyboards.

     

    Seen.

     

     

  8. even in contact us spam u can let all emails forward but send the spammy ones only to urself, the table controler classes in ur application can be fixed whith a regular expression function on every function call in order to check the classes global variables for injection befcore they are submitted to sql, you can centralise a list of chars to check for in an global array .

  9. nadeemshafi9, I like your idea about not banning and just keeping the vandalism but hiding it.

    yet how to employ such a tactic?

     

    you have to learn regular expressions to search the text inside out

     

    if(ereg(exp, string)) string = ereg_replace(exp, string) etc

  10. For a database version of the code you would not query to retrieve all the entries in the table and loop through every row in the result and test if the current value matches an entry. You would form a query to directly find if the current value is in the table and test if the result set returned a matching row or you would use a sql count() in the query and test the count value returned by the query.

     

    yes i am starting to do that stuff more and more mysql_num_rows

  11. basicaly

     

    fill this up with ur banned ip's from the db

     

    $banip = array('127.0.0.1','127.0.0.2','?27.0.0.3');

     

    and in this

     

    for($i=0;$i<3;$i++){

     

    where it says 3 you have to replace it for a variable that is the amount of banned ip's

    ---------------------------------

    so just do this

     

    $ip = $_SERVER['REMOTE_ADDR'];

     

    sql = get all the banned ips;

     

    result = execute query;

     

    while (banned_ip = mysql_fetch_array(result)){

       if($ip == $banned_ip['db field of banned ip's']) {

                echo "You are currently banned from this website, sorry!";

                //you may need an exit here if ur getting duplicate entries.

       }

    }

     

    banning ip's is a silly thing to do, it limits ur trafic, another person may use the same ip in dynamic ip, ur killing urself, you need to find there vandalism and destroy it on site yet let them come in better yet keep it and hide it

  12. <?php
         echo "<select name=\"set_user\">";
         $users_rs = mysql_query("SELECT * FROM users ORDER BY username DESC");
         echo "<option value=\"\">Select a user</option>";
     while($user = mysql_fetch_array($result)){
     	echo "<option value=\"".$user['userid']."\">".$user['username']."</option>";
     }
         echo "</select>";
    ?>
    

  13. cool, exactly what i was looking for, my prob now is that my imap error comming back from imap-open() is that it says it needs a certificate, are imap functions teh base of pop3 etc ? and what about this certificate buisness

     

    here is the err from imap open

     

    can't connect: Certificate failure for server.canttellu.com: self signed certificate: /C=US/ST=NY/L=New York/O=Courier Mail Server/OU=Automatically-generated IMAP SSL key/CN=localhost/emailAddress=postmaster@example.com

     

    plz help

  14. Take the domain name and ping it eg afte rthe @ and then ping that, if it exists then you have atleast 1 good sign, also check the email is well formed, this should eliminate alot of bounces, as for an address im surer you can set up a bounce back address on your server admin client web page, as you can see im developing a similar app

×
×
  • 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.