Jump to content

dsaba

Members
  • Posts

    724
  • Joined

  • Last visited

    Never

Everything posted by dsaba

  1. Thanks everyone! I should have read PF's post before I did it the hard way.. but I did search and found phpmailer. It works great! For future reference, here's what I did: 1. Download http://sourceforge.net/project/showfiles.php?group_id=26031&package_id=252700&release_id=639626 Got the package for my PHP5 version 2. Went to the examples/test_gmail.php and filled in my gmail account info 3. Uncommented openssl extension in PHP.INI, then had to copy openssl.dll file from the PHP5 windows binary (which i had to redownload) to my c:\PHP\ext folder 4. restarted Apache 5. Ran test_gmail.php Works like a charm! What a great way to send emails with php without using built in mail functions. You don't need gmail for your domain, all you need is a free gmail account. And to clarify things up, you're not sending the email with Gmail's POP service but with gmail's smtp service. I think this was what premiso was trying to say, but meant to say smtp instead of pop.
  2. I don't own a domain and I don't have Gmail for my domain service. In layman's terms what I was asking is whats the easiest way to stick something in my gmail inbox without using php's email functions. (Take note I don't want to send an email FROM my gmail account, i want to send an email TO my gmail account) Will POP help me do this? Or can I send an email via TCP or some other protocol?
  3. I want to send email messages to GMAIL, which has POP and IMAP. But its also a regular email. I just want to send to my gmail inbox from a php script. I've seen some classes like this: http://www.phpclasses.org/browse/package/2.html It talks a lot about reading messages, again I just want to send to it. So how can I do this without using PHP's built in email functions. These are blocked by my host. Thanks
  4. I'm trying to identify the regions of ranges or coordinates where there are adjacent pixels of the same color. In simpler terms, the regions in an image where it is filled by a solid color. The image can have any number of different regions in any number of particular colors. I thought about parsing each pixel in a loop with imagecolorat() to find out where these regions are. However, I realized since I'm looking for a patterns, why not let regex do the work for me? The images are 6-10kb, so its not that much data for regex to deal with. The input images are coming in originally in GIF format, but with PHP's image functions I'm capable of converting them to any format like JPEG or PNG. This is another thing I'm not sure about: What image format is best to work with when looking at raw image data to see patterns of the same colored pixels? Surely some knowledge of the way these image formats are structured will be helpful in creating a regex for this. If you have a better idea for quickly identifying these regions other than the two I mentioned, I'd love to hear it as well. So how do I go about doing this, even possible? -thanks.
  5. The whole string must be that, or part of the string? part of string: \[a-zA-Z0-9_\.\-]+\ the whole string: \^[a-zA-Z0-9_\.\-]+$\m http://is.gd/Tyt why the subgroup? it looks fine, its probably something else that is causing your problems. You should have posted some problem code.
  6. if you find a handy bot information repository, let us know (not sarcasm)
  7. I don't see how this can connect well with social networking sites... We can call social networking world virtual reality, but in comparison to this, it's really not. At least social networking fools you with screenames of people you know in real life and real people's names to let you venture virtually but with the impression that it is real. You can decorate yourself with mostly real pictures of yourself and friends and real information. This new virtual world is a large leap from that. I think the appeal that most people find in social networking is far different from the appeal needed to take interest in this. This is more like gaming.
  8. well javascript is a browser thing. (correct me if i'm wrong) if the bot ran through a browser (i doubt it) it would generate browser-like behaviors like onClick and onLoad events, a bot can mimic a user-agent to pretend its accessing the page via a particular browser, but it cannot mimic javascript/browser behaviors like the clicking of buttons, unless of course it is being run through a browser so can you generate browser-like events NOT in a browser? smarter bots aren't going to necessarily post straight to the action of the form, they usually always load the form first or access it, so what's the power in a "token system"? the time observation among real users is a great idea
  9. I have a bunch of open ended questions that I think we should debate about here on phpfreaks and on the help genre of forums. Feel free to answer all or some of these questions, and of course explain the reasoning behind your answer. Try to be as realistic as possible. ie: Idealists who say those who are helped here should show their gratitude would argue that the helped should make a donation to phpfreaks. The reality is that not everyone will do this and yet still receive their help and still want to show their gratitude. What are they to do? The questions: Someone has helped you with your problem. You appreciate it. You want to show your gratitude. What do you do? Is simply saying "thank you" as the last post in your thread acceptable behavior in showing gratitude? Think about how this will bump the thread and add no useful information to the already solved thread. If it is acceptable, within what time frame can you do it. Consider the effect of bumping an older thread. Does it even matter that much? You have taken time to write a well-explained problem and background information to it. Numerous people have replied with "bad help" and advice that are ignorant to the original problem. What do you do? Think about the role moderators have, if they should be made aware by reports of this or what not... Think about the time and effort a possible "bad helper" has put into delivering his bad help. Think about spam, and how it might apply here. Can you think of how forum etiquette can get in the way of true analysis of information and conversation/communication of information? If to learn and gain knowledge is one of the purposes of this forum, how can forum etiquette get in the way of this? Where does the line draw? Who will decide if a disagreement is an argument of useless spamming or a bridge to build information and increase knowledge? Isn't gratitude overrated? Don't those who help have more desire to help than to receive gratitude or recognition for their help? The reality is that in your career as a a helper you will most often not receive the gratitude your deserve.
  10. I'm guessing that if a user tries to create a file, even in the /var/tmp that is an upload, the server stops it from happening. AFAIK, there is nothing you can do to get around this, otherwise the server admins wouldn't even have it in place. This is one of those situations where you would probably need a Java or .NET component on your site that the user installs. This component would be responsible for allowing the user to select a file to upload and if the file is larger than a certain size, the component would break it into chunks and upload them individually. Yes unfortunately, this is what I tried to explain in my very first post, which it took about 3 more repetitive posts for me to repeat myself for someone to get it. Only for you to tell me that it can't be done... I had already assumed this and talked about it (yep in my first post). If this is help I could have helped myself! Rather, I would appreciate it if someone could tell me WHY or explain the upload process in (oh yeah i asked about this in my first post as well) of how it is impossible to read a little bit of the file at a time without storing it all in 1 variable/temp file. I've been waiting for someone to address this, and why you haven't I can only assume it is because you can't read or you are un-knowledgable about it. My ask for help was never about you trying to guess or circumvent my server's restrictions, but about the concept I described in my first post.
  11. That's beside the point little guy, but assume the file size restrictions are on variables and all files put on the server during any process. You said you explained what I was asking earlier... Apparantly, I don't see how your method can avoid saving the size of the original file in a variable/file/temp. file. Clarify how you solve this problem with your method.
  12. The goal is to take a BIG untouched file. Let PHP upload it and save it into multiple pieces of itself, without ever storing the original size of the file in a variable or file on the server. So that won't work.
  13. Background: The server has limits on the sizes of files. I want to upload big files and then split them into smaller ones, thus the file sizes being within the limits of the server rules. Question: Is it possible to be able to upload a big file and save it by splitting it into multiple pieces, but without ever having a big file to start with? Hypothesis: I don't think its possible because PHP uses the HTTP protocol of uploading files via the html form method of the browse button. (<--- Feel free to correct me on the specifics) How would it be possible to upload a BIG file and split it into multiple pieces without ever having saving the BIG file first? Well, I suppose (but i'm not too knowledgeable on the specifics of the file upload process technicalities.. feel free to fill the gaps) that process would have to upload a little bit of the file at a time from the 'buffer' or 'stream' of data coming it (whatever you want to call it), each little bit it reads it can then save and move the pointer to the next bit of the file and continue saving it in small pieces. This way it would never have to upload the whole file before it starts the splitting process. Whether you can upload a file a little bit at a time with HTTP protocol or PHP I am not sure, and this is part of the point of this question. That's my only idea of uploading a big file and splitting it into smaller pieces without having uploaded and saved the big file first. Is my idea possible? If so, show me how. And/or give me your idea/solution. I thought about actionscript and flash, but if it can't be done in PHP I don't see how flash could do it either since it communicates with HTTP protocols in file uploading as well.... -thanks
  14. Yes, I think Microsoft's docs for JScript is the best I've seen so far for javascript. Mozilla's page says its undergoing 're-organization' though.. but its pretty hard in my opinion to get around it.. much less search for methods in it. However if you didn't understand me I'm thinking more on the lines of 1 site to rule them all, but organized something in a php.net-ish fashion.
  15. Hey I'm just another frustrated & beginning javascript programmer. I'm really shocked in the lack of documenation organization in such an essential language for the web. Yes, I've read about the history of javascript and how "javascript" itself is only a concept while the actual language is a criss-cross combination of different dialects like Jscript & Gecko Javascript. A beginning javascript programmer or any for that matter comes across too much junk, too many half-truth snippet/tutorial sites, too many ad-infested "javascript resources" and a whole lot of other misleading information. If people could rank the confusion in web technologies, javascript would probably be right up there. Because this is a constantly evolving language with updates and changes all the time, no book can match an internet documenation, especially in this internet age. If you were to pick up the latest PHP book and the php.net documenation and confusion arises, most would find confidence in internet documentation to resolve the issue. I love the PHP.net documentation as you can have mostly all reliable information all in 1 place. Why can't javascript be like this? Well, critics would argue that because we're talking about two different dialects and langauges within themselves this could never be. However, there IS a reason why Jscript and javascript are clunked into one 'javascript', because of their similarity! Nobody can deny that understanding Jscript and javascript and cross browserish concepts are essential to any javascript programmers. The fact is that there are more methods/properties that are verbatim-the same in both dialects than there are differences. ECMAScript was supposed to come to the rescue and bring standards to standardless langauges. Yay! Now we can read the ECMAScript docs and all our problems will be solved right? NOT! A documenation website in PDF-form is a joke anyways... (think about searching in it) Well, I have an idea to create a similar documenation website like PHP.net but for javascript. You would be able to see information in an organized manner and information on what methods/properties work in what browsers, dialects, etc... Who likes going to at least 3 different places to get documenation and each website has different methods of organizing the information! How confusing if you're constantly looking at both, (which we all have to do!)! It took me way too long just to find a simple method that is the same in both dialects on both documenation pages... Bla..bla..bla.. Stop complaining and make it you say? Sure, I want to. But this last bit is the purpose of me posting here on this forum. Like I said earlier, I am javascript beginner so I not familiar with all the objects/methods/major differences in the major dialects of javascript. Now its time for the javascript gurus to respond (no that doesn't mean you noobs). ----------------------------------------------------------- What do you think about such an idea? (if you don't like it say why) Do think it will work and there are less major differences in both dialects to make an organization of both easier? In the differences between the languages, aren't there more differences in the same methods but with different names, than there are completely different methodologies to doing the same thing on both dialects? If you're worried about the authenticity of the documenation by such an "un-official" documentation. Don't worry about this. Assume it will be super authentic information, and there are ways to populate it with this easily.
  16. Yes I noticed you removed the subgroup and replaced it with a lookahead to remove the need of the subgroup. I was probing whether the removal of subgroups for a lookahead would be faster or slower in a fixed situation (don't have one at the moment..) No, but you're welcome to make one. I read somewhere or got the idea that when the regex engine has to 'backtrack' or look behind in some sense it will sacrifice speed. That's why I was making distinction with speed and lookbehind vs. lookahead.
  17. Because its a lookahead, you won't sacrifice speed right? If it were a lookbehind, it would be faster to use subgroups right?
  18. Hi is there an easy way (method, property) to get the string occupying a "visual line" in a wordwrapped textarea? What I mean by visual line: A string of characters that does not spill into the line below it and occupies one line on the textarea, even if this line strays into the right-side scrolling portion of the textarea. How would a wordwrapped textarea manage to have a horizontal scroll bar you ask? Well, a line will have horizontal scrollbar when the # of chars occupying the line are more than the width dimensions of the textarea AND there are no spaces in the line. ie: sdddddNOSPACESddddddsddddddddddddddddddddddd A simpleton solution is to determine where there are linebreaks and after that determine where there are more characters than what fits on a line. That in itself is a debatable matter, because how many characters that fit on a textarea line depend on their pixel width which is not uniform for all characters in the same pixel setting. IE: in the same pixel size the char 'a' will have different pixel width than '.' A line full of '.' will have more characters occupying it than a line full of 'a' -thanks for reading
  19. I've tried these properties of the textarea element: offsetHeight scrollHeight They effectively tell me when the text has overflowed where it causes there to be scrollbars in the textarea. However, I need to know the location of scrollbars themselves. How can I know where the scrollbar stands in its scrolling range? I have no idea if the user has scrolled halfway down the textarea, not scrolled at all, or when they start to scroll. How can i tell the location of the scrollbar (width or height) in a textarea? -thanks
  20. Hi, I asked about trying to get approximate pixels for width & height of a single font character across browsers. I got a reply about how identifying such a thing is impossible... This is the background "big goal" of my current question, which is an idea on how to measure this pixel width & height of a text character. Can you place things inside of a "stretchy" container(div) and then obtain the width & height of this stretchy container which will stretch to hold the contents (some text, some graphics.. whatever..). If this is possible (and you understood my explanation ), can you show me some CSS/HTML code to do this? The idea is the parent element container will be bigger than it was before because of the addition of a child element inside of it that causes it to expand. This expansion should be snug exactly to the child element as well. Therefore, by measuring the dimensions of the newly stretched parent element, you can know the dimensions of its child element. -thanks ___________
  21. Let's say you have a textarea 30px by 30px, you fill it with more than 10,000 text characters. It will obvious that the scrollbars will activated because there is so much text in the small space. In other words, it 'overflowed'. Now other than common sense, is it possible to tactically tell with javascript/css when text in a textarea has overflowed, or caused there to be the appearance of of scrollbars, height scrollbars and/or width scrollbars. If so, I'd like to see some code to achieve this. -Thanks
  22. $mCat = 'Mens Fragrance > bla bla bla something div <div></div>'; if (preg_match('/Mens Fragrance >(?P<something>.+?)<\/div>/', $mCat, $match)) { print_r($match); } http://nancywalshee03.freehostia.com/regextester/regex_tester.php?seeSaved=g2qsmaw5 You make us work too hard to find out what you're really asking. What comes after 'something' is pretty important to this type of pattern, from your limited explanation that should work.
×
×
  • 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.