Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About coolshrimp

  • Rank

Contact Methods

  • Website URL

Profile Information

  • Location
  1. Thank you very much i got it working. http://demosites.com/Refugee/ now i work on comparing 2 arrays and not showing items if someone has already registered for an item.
  2. i found what was missing but when i print out array to a page it is blank.. <?php $categories = array(); $count = 0; foreach ($CSVArray as $row) { if ($count > 1 && !empty($row[0])) { $category = $row[0]; $item = $row[3]; $description = $row[4]; if(!isset($categories[$category])) { $categories[$category] = array(); } $categories[$category][] = array( 'Item' => $item, 'Description' => $description ); } } //List categories on screen print_r ($categories); ?>
  3. I get Parse error: syntax error, unexpected end of file
  4. I'm trying to auto populate a multidimensional box from a csv file. Example of drop down: Example Code for drop down: <select class="form-control" name="Items[]" multiple> <optgroup label="Catagory 1"></optgroup> <option value="1">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> <option value="4">Option 4</option> <option value="5">Option 5</option> <option value="6">Option 6</option> <optgroup label="Catagory 2"></
  5. hey guys so i want to do this right no mistakes i need some help. I have one hosting account that i use to host multiple sites (Separate folders). id like to make it so if say a "website" in one folder got hacked they cannot access files in another websites folder. I was told open_basedir for each directory is what i need. Id like to protect each main folder listed in "HostedSites" as a separate site. (Website 1,2,3,4,5,) as well as my own main sites listed in public_html. (Shop, Forum, Demo) also is there a way to automatically set open_dir to any new site added into "HostedSites" folde
  6. can i just do this use ajax to run script dosent seem to affect page at all and user will not know its running. it also appends to body the console log once it is done so i will know what went on. is this a proper use or any issues with this? <script type="application/javascript"> function loadimages(){ $.ajax({ type: "POST", url:"php/thumbnail/Thumb.php", success: function(html){ $('body').append(html); } }); } window.onload = function() { setTimeout(loadimages, 2000); }; </script> Seems to work. load page and watch console log for change:
  7. look over let me know if you see any possible issues. it seems to all work. Now how can i run this script without affecting users page load? will i just have to manually run it each time i make a change? or would a cron job be in order? if using cron would i do: curl http://sale.coolshrimpmodz.com/php/thumbnail/Thumb.php or wget http://sale.coolshrimpmodz.com/php/thumbnail/Thumb.php THE SCRIPT Thumb.php <?php /** * * @Created By Coolshrimp Modz */ /*error_reporting(E_ALL); ini_set('display_errors', 1);*/ include '../logConsole.php'; //CSV Reader Scripts $FileLocaton = $_SERVER[
  8. Check it out. Here is page that will show you what has images and what does not. http://sale.coolshrimpmodz.com/php/thumbnail/check.html Here is Script that creates or removes thumbs from folder, Page is blank but it prints out log to browser console. http://sale.coolshrimpmodz.com/php/thumbnail/Thumb.php
  9. Thanks so far for your guys help. I'm creating a script for all to use that will compare a list of files to directory of files and it will create or delete thumbs. will post soon will need suggestions on how to run this each time person visits page without making them wait if possible.
  10. think i got it changed to $img = @imagecreatefromjpeg($sImagePath) or print_r ("Cannot create new JPEG image<br>");
  11. on my script above in the function "CreateThumb" $img = @imagecreatefromjpeg($sImagePath) or die("Cannot create new JPEG image"); if it cant create image it will Die and echo error message. how can i make it end the function but continue the script. Die seems to stop whole script on error. i want it to continue onto the next image.
  12. page is down to 3sec to render at 1.4 MB http://tools.pingdom.com/fpt/#!/54o5D/http://sale.coolshrimpmodz.com/index_test.html
  13. ok ill have to lear how this whole ajax thing works. as for my script above see any issues? it seems to work
  14. iv got it working now how can i show each echo in script as it runs and not all at once when php is finished. Here is code that is working: Reads from my CSV, check is image tumbs aready exist, if not then creates a small thumb from (Image URL) and saves with (ID) iv specified in a column, then creates a big thumb and saves the same way. <?php echo "Creating Thumbnails<br><br>"; //CSV Reader Scripts $FileLocaton = $_SERVER['DOCUMENT_ROOT'] . '/php/CSVReader.php'; if (file_exists($FileLocaton)) { //Automatic Path include $FileLocaton; } else { //Backup Maual Pa
  15. this on the right track? <?php //CSV Reader Scripts $FileLocaton = $_SERVER['DOCUMENT_ROOT'] . '/php/CSVReader.php'; if (file_exists($FileLocaton)) { //Automatic Path include $FileLocaton; } else { //Backup Maual Path include 'php/CSVReader.php'; } //Set CSV Location $CSV = 'csvlist.csv'; //CSV Converted To Array $CSVArray = csv_to_array($CSV); $count = 0; foreach ($CSVArray as $row) { $count++; if ($count > 1 && $row[1] !== "") { //Get FileID & Link URL from CSV $id = preg_replace("/[^a-zA-Z0-9]/", "", $row[1]); $file = $row[8];
  • Create New...