Jump to content
xisto Community

TavoxPeru

Members
  • Content Count

    865
  • Joined

  • Last visited

Posts posted by TavoxPeru


  1. We all know you can use PHP with a web server, but can you use it with a mail server?

     

    I've made a personal messenger system, and I was thinking about adding additional functionality in the future, such as the ability to send mail from it. Then I started thinking, would it be possible to recieve mail with it? Say, have a PHP script that checked when a message arrived at the server, and when it does, check for something in the message (e.g. "pmsystem-to: admin") that would tell it to send it to a certain user, and then have it do the scripts to send a PM.

     

    So, is it possible to do this with a mail server? Because it really would be something cool that you don't see in many PM systems

    Well, yes, it is possible to do what you want to do, for sending emails you use the mail() php function, for receiving sorry but i don't know how you can do it, also, i know that there are a lot of scripts out there that are capable to check POP3 and SMTP servers.

     

    Take a look at the PHP Classes website, you can find there what you need.

     

    Best regards,


  2. Hi, I've been working on a personal messenger, and one of the main problems I'm having is that if there are 10 or so replies to a message, you end up with a subject like this:Re: Re: Re: Re: Re: Re: Re: ..... etc. you get the picture
    Is there a function on PHP to check for an occurence of a substring in a string? So I could check if the subject already has a "Re: " in it? It would be really helpful, thanks!

    You can use regular expresions php functions like ereg_replace or preg_replace, also you can use the php functions str_replace, str_ireplace, substr_replace or strtr.

    Best regards,

  3. Well, only to say that i work in a similar way as vujsa does, the cPanel theme does not have any importance, because it doesn't stops me to work with it, i understand that if you are a beginner maybe you dont know how powerful is a ftp client, until now of course.Best regards,


  4. You can use the Chr() php function, this function returns a one-character string that contains the character specified by the ascii code passed to the function as a parameter.

    For example try this code:

    $var=chr(40) . chr(39) ."Test" . chr(39) . chr(59) . chr(41);echo $var;

    You can get all the ascii codes with the following function:
    for($x=32; $x<256;$x++) {echo "code = $x : char = " . chr($x) . "<br />";}
    I start the for with the value 32 -it is the space character- because all the prior characters are control characters that you don't need i guess, if you want change it to 1 and see what i'm talking.

    BTW, sorry but right now i don't have more time to test if it would work fine with HTML code, maybe later i can.

    Best regards,

  5. You didn't create a standalone application, you've created a script that is interpreted by another program (php). Thus PHP is a scripting language. As long as you don't complile prior to running your application, you can say that a language is a scripting language.

    Ok, i think it is true in a certain way but i don't completely agree with you because there exists compilers for PHP, the one i remember in this moment is the Roadsend PHP Compiler, this is what it says on its main page:

    Roadsend PHP Compiler is a free, open source native compiler for the PHP language. It compiles PHP source code to stand alone, native binaries which do not require an interpreter. Roadsend Compiler can build online web applications with Fast/CGI, offline web applications with an embedded web server (MicroServer), desktop GUI applications with PHP-GTK, and console applications. It is available on Linux, Windows, and FreeBSD.

    For more information visit the Roadsend PHP Compiler website.
    Best regards,

  6. I uploaded my PHP game yesterday, and most of my friends tried it out. After a while, I tried to play as well but it said that mysql_connect() had too many connections already. Can anyone tell me how to increase the amount of connections or maybe the total amount of connections allowed?

    You need to change the mysql.max_links directive and set it to -1, you can set this directive in your php.ini configuration file or in your apache's httpd.conf file.
    Also, check out the MySql max_connections system variable, this variable controls the number of connections allowed that by default is 100. so if you need more connections, you should restart mysqld with a larger value for this variable.

    If you are using MySql 5 take a look to B.1.2.6. Too many connections.

    Best regards,

  7. My own thoughts on this topic; I've been using AVG for years along with Zone Alarm, and I have to say that I would thoroughly recommend them to anyone. Sure AVG can't catch everything, by then no virus checker can. I would argue that what is more important is exercising caution when downloading, being careful, taking sensible precautions. Under these circumstances then a small, light Virus Checker like AVG is a joy.
    I don't recommend Symantec at all. They used to be okay back in the 90s, now they are dreadful. I had the pleasure of talking to one of their executives, and he doesn't have a clue about viruses other than the sales pitch for corporations that's been drummed into him. My discussion about the latest anti-virus research baffled him. Symantec are only interested in corporates and banks. Any Virus checkers they have available aimed at personal users and small businesses were created as an afterthought. It's an obnoxiously large piece of crap that spawns no less than 10 different processes, uses an incredibly ridiculous amount of system resources, like AOL it won't uninstall cleanly, and causes too many crashes.

    AVG I have never had any problems with and will continue to use it.

    I agree with you and of course i will continue to use it, the Symantec Antivirus is a crap and it is very dificult to completely uninstall it, especially it's Live Update software, is a shame what was happened with this company, i remember all the very good software that it had before Symantec buys the Norton company.

    Best regards,

  8. ok now when I go to the admin panel and I go to change the colors it has color codes. and the bad thing is that I have no idea what color is what and it's confusing so is there a site or something to help with the color knowing what codes are what??

    Yes, you have some options for this, online tools, freeware or the RGBHex Triplet color chart image.

     

    Online Tools:

    Dhtml Goodies Color Schemer I

    Dhtml Goodies Color Schemer II

    GenoPal Online

    Freeware:

    PaintChips - Dynamic free color picker This site is outdated, i could search the installer on my pc if you want this freeware so please PM and let me know.

    ColorPic - The versatile color picker

    RGBHex Triplet color chart

     

    Best regards,


  9. Well, you said it at the wrong place. If an admin who handle huge databases, be it MySQL or any other database, do you think he would have joint this forum? What you see here only represent a small community of netizen. So you cannot imply that there's actually no MySQL database that could go to some hundreds of "higs" or terabytes. :P

    That's right, especially if the MySql database stores images or when it uses the spatial features that MySql has. Take a look to the MySql Customers page.
    Best regards,

  10. Well I know that MySQL databases can get rather big, so I was just wondering how big everybodies databases were? Do you have really big ones, or are they relatively small? Also what do you store in them? (just text, or binary data as well)

    In my case my databases are relatively small because i try to store just text, when i need to store binary data what i do is to simply store its location on the file system.
    Best regards,

  11. It is good practice to close these tags with " />" instead of just ">", because this is required in XHTML.
    Another way to include an external stylesheet is to use the following code:

    <style type="text/css" media="all">	@import url(style_images/css_2.css);</style>

    While it works the same way as the previous one in newer browsers, it will not function in older ones (e.g. Netscape 4). If you don't see it as being useful, think of it this way - browsers that don't support @import also don't support CSS to the extent necessary today. In order to avoid any possible errors, you should use <link> for basic CSS rules (font-family, font-color etc.) and @import for advance ones, which wouldn't be recognized by older browsers anyway.
    Thanks for the information, the use of @import was one of the few things that i don't completely understand about css until now.

    Best regards,

  12. Check out the latest version 5 of the script: http://forums.xisto.com/no_longer_exists/
    Changes:-

    > New & Improved Progress Bar.
    > Profile Override - If found, the site address is taken from the member's profile.

    Note: Database saving/loading is currently disabled.

    I just check it, and after some problems i finally view it, very nice the progress bar. Do you have a historical page to see how it was made????

    Best regards,

  13. Does anyone know how to get fixed positions to work in Internet Explorer? Or something so they still stay in the same spot when you scroll down?
    I'm making something and I need 2 images fixed, on in top left corner and one in bottom right corner. its really annoying, so does anyone know what to do? cos i dont and i really need to, lol, for a little something im doing.

    just another problem with internet explorer, its terrible!

    anyway anyone know what to do?

    Use css to put the image on top left corner, something like this will work i guess:
    #imageTopLeft { position:absolute; top:0px; left:0px }
    For the image on bottom right corner i also guess that you must use css but right now i don't know how to do it.

    Best regards,

  14. I'm having a bad problem and no idea how to fix it...it's setting my back on my PHP work.
    I have 7 if statements that do something depending on what $_POST['command'] is, it works for the first 6th and on the last one it adds a 1 (only ads the 1 at the end IF its the one in the if statement).

    Example of the failing line:

    if ($_POST['final'] == 'yes' AND $_POST['command'] == 'lol' AND $_POST['action'] == 'cmd'){
    The other ifs are like that, just $_POST['command'] == other things.

    Those if statements work. It does this with $_GET and $_REQUEST. It does this no matter what I put in the statement and if i make it blank it puts a 1 anyways.

    I even put this before the if statement:
    $whattostrp2 = array("1");  $_POST['command']= str_replace($whattostrp2, "", "$_POST[command]");
    STILL adds a 1. I have it echoing the $_POST['command'], hence how I know this. What I don't understand its WHY it does this ONLY on the 7th if statement and not the others. I tried to make it where $_POST['command'] == 'lol1' and it adds ANOTHER 1.

    It also does this with else if and elseif. If I redo the IF statement like this:
    if ($_POST['command'] == 'lol'){

    It still fails.

    Any ideas? This is really bugging me and I have found NOTHING on it.
    Do you try to do the same thing but instead of using the operator '==' use the operator '===' that also compares if both sides are of the same type.

    Best regards,

  15. *should have known better* pyost is right. The content of your signature does not affect post count, and what I didn't know was whether editing your post and changing your signature for that post would affect post count. But the smart people who made the board we use don't let you edit your signature like that, so, no, signature does not affect post count. And pyost is also right that anything inside an offsetting BBCode does not count either.
    ~Viz

    Ok thanks again for this helpful information, i think that now everything is completely clear.

    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.