Jump to content

mattisl

Members
  • Posts

    20
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.gamalog-media.com
  • ICQ
    0

mattisl's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. If you don't like Javascript you could use this PHP solution: 1. Create a folder called rand_images and put all the images in it. 2. Name the images 0.gif, 1.gif, 2.gif, 3.gif, 4.gif etc. 3. Create a file called rand_images.php and put this code into it: ><? // This script returns an image header("Content-type: image/gif"); $image_count = 5; // Set this variable to the total amount of // images in the rand_images folder // Load a random image $image = fopen("rand_images/".rand(0,$image_count-1).".gif","r"); // Return the image fpassthru($image); ?> 4. Now when you want to display a random image, just use this html code: ><img src="rand_images.php"> ---------- This should work
  2. Try putting this code at the start of the classes.php file: >// Start session session_start(); // Get selected language from url switch($_GET["sessLang"]) { default: // No language has been selected case "english": // English has been selected $_SESSION["sessLang"] = "english"; break; case "french": // French has been selected $_SESSION["sessLang"] = "french"; break; } Now the language value is stored in the element "sessLang" in the $_SESSION array. You will also need to put session_start(); at the beginning on every page where you want to get access to the $_SESSION array.
  3. Changing the return value to 0 didn't change anything I checked the delivery failure e-mail again and found this error: Warning: fread(): supplied argument is not a valid stream resource in /home/myusername/public_html/myfolder/parser.php on line 5. Line 5 is: $message = fread(STDIN, 1024);
  4. The script runs now when I send an e-mail to me@****. However I get a "Mail delivery failure" e-mail back to the address I sent the first e-mail from. I understand that I need to return some kind of value that indicates that the script was successful, which value should be returned? Also I wasn't able to read the e-mail from STDIN. This is my code so far: >#!/usr/bin/php <? if(!defined("STDIN")) define("STDIN", "fopen('php://stdin','r')"); $message = fread(STDIN, 1024); mail("mattis@gamalog-media.com","E-mail parsing test!","The message:\n".$message,""); return true; ?>
  5. Still can't get it working This is how I set it up: Destination: |/home/myusername/public_html/myfolder/parser.php Then I set the parser.php permissions to 744. My parser.php file looks exactly like this:; >#!/usr/bin/php <? mail("me@****","E-mail parsing test!","Seems to work...",""); ?> When I run the filter test in Cpanel it shows this: ------------ If all works right I should receive an e-mail at me@**** sent from the php-script, this mail however doesn't get sent =/. Going directly to http://www.example.com/myfolder/parser.php works. Thanks for your help so far, the support is great as always Rock Sign
  6. Looks exactly like the thing I need However I couldn't quite figure out how the destination works. Lets say I have my php-parser called "parser.php" in a subfolder called "myfolder" (the full url would be http://www.example.com/myfolder/parser.php). What should the destination text look like? I've tried: "|/home/myusername/myfolder/parser.php" "|/home/myusername/public_html/myfolder/parser.php" "|/myfolder/parser.php" "|/public_html/myfolder/parser.php" But without success.
  7. Is it possible to trigger a PHP-script when an e-mail has been received on a specific address? E.g when a mail has been sent to automatic@**** I want the content to be parsed by one of my php script automatically. Can this be done? / Mattis
  8. Hi, I also needed bbCode support on one of my sites a while ago. I found the part of the phpbb code that took care of the text parsing but I was to lazy to figure out how those regular expressions work . I wrote my own function that does some search and replace actions instead, it might be a little slower but it seems to work . The functions supports: [ i ] italic [ /i ] [ b ] bold [ /b] [ u ] underline [ /u ] [ url ] links [ /u ] [ url=http://something ] hyperlinks [ /url ] [ img ] image.gif [ /img ] I attached it to this post. Hope it helps textparsing.txt
  9. Hi, I currently have a Gold Plan account at TCH. One of my websites may need more bandwidth so I thought I'll check out the options for a dedicated server However I am a little confused about the difference of the three services you offer and have some questions: 1. Does Semi-dedicated meen that there are 2 users on the server? 2. What is the difference between Managed and Unamanaged? Which things will I have to manage myself? 3. Will you still fix hardware-, software problems with my server if it is Unmanaged? Thank you
  10. Hi, I am coding an internet browser game which is getting pretty big (code-wise). I just tried running the battle script for the game and added a timer for the execution time. The battle PHP script takes about 0.5 to 1.0 seconds to execute while the other pages take 0.1 or less. I am on a shared server (server 64) and wonder if scripts that take more than 1 second to execute will slow down the other websites on that server. Also, does the server run several PHP scripts at once, or does it run one script at a time?
  11. Hi, I'm not sure if this is the right forum to post in, feel free to remove/move the post if it isn't I am searching for a new software that can manage remote mySQL databases. I have been using a program called MySQL Front a few months now, but it has so many bugs I can't use it for larger databases anymore. Any tips for another program that works well with large databases? / Mattis
  12. Thank you for your suggestions These sure look interesting, I will have a look at them and see if they're what I'm searching for. / Mattis
  13. Hi, I would like to set up a little shop for my site where I can sell some of our companies software. The problem is that everything needs to be automatic, which means: 1. User clicks 'Buy' -button 2. User enters credit card information etc. 3. User sends money 4. User receives a link where he/she can download the software I have considered using Paypal for this, but I could not find a way to make some kind of custom e-mail sent to the user with a link when the payment is done. Are there some other (free) alternatives instead of Paypal to do this? Thanks in advance / Mattis
  14. Yup, seems like my ISP is blocking port 25 or something. Changing it to 26 worked. You guys are great -> Rock Sign <-
×
×
  • Create New...