Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. print out to the screen and you will see. print $_FILES["uploaded_file"]["type"]; exit();
  2. How are you making the request. If you are not using CURL then I recommed this as you can set a request time limit.
  3. Then you cant do it because 2 applications cannot listen on the same port number
  4. explode the file string into an array. The file type will be the last element $filename = "mysong_feat._artist.mp3"; $parts = explode(".", $filename); print_r($parts);
  5. Static functions, variables can be defined anywhere. The static operator cannot be used on a class definition so i'm unsure about your definition of a static class.
  6. Move webhost. They sound poor.
  7. This is always going to be a problem searching through text fields where there are many thousand rows. I had the same problem with a popular article site. The solution was to take the search capabilities away from MySql and use a full text search engine that can index your database records. I used Lucene which is integrated into the Zend Framework (was at the time anyway) but there are others.
  8. Use Imagemagick convert command to manipulate your images through exec(). Most shared hosts have it installed.
  9. I would use a text file for bad words and then read within the function. Makes it easier to add to rather than adding to the function code.
  10. Learn PHP's GD library functions. There are PNG functions just as JPEG functions. Learn the function parameters to move the text to the desired location. Learn how to create an HTML form that will post to the PHP file and use the input in a variable to display on the graphic. Don't try to get people here to do the whole job for you.
  11. I would stay away from gentoo as installing software is a pain in the arse unless you are familiar with it. Our hosts installed this on one of our servers that I was going to use for video streaming. Couldn't get any of the packages I needed installed properly! Got them to reinstall with CentOs and I had it all setup and working in about 20 minutes. CentOs and Fedora are the easiest to work with. Most Linux books I have use Fedora to demonstrate with.
  12. use a loop for($x = 1; $x <= 20; $x++) { if(isset($_GET['item_'.$x])) { $_SESSION['item_'.$x] = $_GET['item_'.$x]; } elseif(!isset($_SESSION['item_'.$x])) { $_SESSION['item_'.$x] = ""; } }
  13. Anyone got a method for this? From x I need item num/combinations. i.e. x = 2 items combinations ================= 2 1,1 1 2 x = 3 items combinations ================= 3 1,1,1 2 1,2 2 2,1 1 3
  14. Why do you need access to code? If you can see information on-screen then you can grab it.
  15. Quick example // display the links $letters = range('a','z'); foreach($letters as $letter) { print "<a href='search.php?letter=".$letter."'>".$letter."</a> | } // *********** // search.php // *********** mysql_query("SELECT * FROM table WHERE field like '".$_GET['letter']."%'"); // display results
  16. If you need to grab lets say a block of text from a page you could use CURL to get the page, then a series of regular expressions to extract the portion of the page that you require. You will need delimeters to specify where the blocks start and end (maybe a set of div tags within the HTML)
  17. Paths Windows: c:\mystuff\file.txt Linux /home/user/file.txt
  18. After the form is posted on the 1st page, store the $_POST values into session variables and then display them on your second page.
  19. What is this line for? ini_set('Do not reply', 'donotreply@xxxxxxxx.com'); ini_set is for php configuration options.
  20. Look at the cart class in osCommerce and use it as a template to construct your own
  21. Are the paths correct? Have you echoed out the filepath to check? readfile("$dir/{$result['file_name_full']}"); Have the files got read permissions? What is the error you are receiving?
  22. At what point does it run out of memory? You could also try increasing memory using: ini_set('memory_limit', '128M'); at the top of the script
  23. javascript onFocus()
  24. Take the query string out of the mysql_query() function and put it into the $query variable replacing the old query: $query = "SELECT * FROM test WHERE expireDate > CURDATE()";
×
×
  • 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.