Jump to content

Samuz

Members
  • Posts

    80
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Samuz's Achievements

Member

Member (2/5)

0

Reputation

  1. No firewall rules have been set as far as I can see in cpanel. Also i'm going to contact the host to enable SSH for us and see how it goes from there. And I received the same cURL here: (couldn't connect to host)
  2. Thanks for your reply. The thing is the file i'm trying to access is under a subdomain of the site the script is running from which confuses me even more, so they are on the same server - I know this for sure. And @dalecosp, the script works for other sites, just not this subdomain.
  3. You shouldn't use first name & last name as unique identifiers, because anyone could have the same problem. Use email or a specific ID number, like National Insurance or whatever, as long as its completely UNIQUE. Then before you insert anything into the database, run a select query to check if that unique field appears in your table more than once. If it appears more than once, display an error message saying that user is already in the database, else you simply insert as you have been doing
  4. This code works nice on my personal remote server and my local one. But I need it on another remote server. Here's code: function getVer($url) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_NOBODY, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_FILETIME, true); $result = curl_exec($curl); if ($result === false) { die(curl_error($curl)); } $final = 1; $timestamp = curl_getinfo($curl, CURLINFO_FILETIME); if ($timestamp != -1) { //otherwise unknown $final = $timestamp; } else { $final = 1; } $test = substr($url, -2, 3); if($test == 'ss') : return str_replace('.css', '-'.$final.'.css', $url); elseif($test == 'js') : return str_replace('.js', '-'.$final.'.js', $url); endif; } If I attempt to it on this url getVer('http://static.trainingdragon.co.uk/assets/css/style.css') it doesn't work and returns an error 'couldnt connect to host'. I looked around and I was under the assumption this was cause the site was being blocked or something. Anyone have a hunch what the problem could be? But I can easily view that url in the browser with no problem
  5. I think you need to start this again. You're floating EVERYTHING to the left and not even clearing them
  6. Thanks for your reply, just realized 'Time' was referring to a custom Time object I had created previously.
  7. Hey guys, i'm at university and we've been given a piece of practical work that I need a little help wiith. I'm coming from a PHP background so I understand OOP and the concept etc. Unlike PHP, in java you have to specify the data type of the variable or 'field' your setting. e,g private int cost; And that seems right to me, because I understand 'int' is a java keyword and it lights up in my IDE. But what if I needed the data type of that variable to be a string or time (as specified in my course)? 'String' or 'Time' doesn't seem to be a keyword in java because the keyword 'String' or 'Time' doesn't light up as it would do for 'boolean', 'char', 'int' etc. So how would I set a variable or 'field' with the data type 'String' ?
  8. I don't exactly need help here. I'm just looking to start a discussion on the use of these two elements. First off, these two work essentially the same (correct me if i'm wrong). I can submit a form with <input type="submit" /> or <button type="submit"></button> And they can be styled to essentially look the same. (With the use of :hover & :active) I'm currently in the process of redesigning one of our old sites and i've noticed in th previous developers code he has used <input> in one place & <button> in others. Normally i've always stuck to <input> and have never bothered to use <button>, because I just like the look of my code when creating forms all showing <input>. :v So I just wanted to know if there was any REAL difference - apart from the default browser styles - from a semantic POV and if there are if somebody could point out when i'm really supposed to use <button> and when i'm supposed to use <input>. Also pros/cons if any. Thanks!
  9. Samuz

    resize()

    actually ignore this thread, found a plugin. for anyone else that may come across with the same problem the url's found here: http://benalman.com/projects/jquery-resize-plugin/
  10. Samuz

    resize()

    Maybe I didn't explain properly. But I essentially need a method to determine when the height of an element has changed..
  11. Samuz

    resize()

    So basically I have certain elements that are positioned based on the size of their window and i'd use the resize handler to reposition those elements if the window size is changed. But what do I do if I want to bind the 'resize' handler to an element? this wouldn't work $('html').resize(function() { // code }); I guess what I want to test is when the height of a specific element has changed?
  12. Really?! There are two problems with that statement. 1) You could EASILY put the values into a single dimensional array when processing the DB results. 2) If you need to know the count of unique names - then just do that using your DB query! Something such as: SELECT name, COUNT(name) as count FROM table GROUP BY name I actually have a very simple solution for getting the result you asked for using the multi-dimensional array, but that is not the solution that you should be using. Thanks mate. Someone needs to slap me for not looking for easier approaches first. heh
  13. Thanks for your reply. It's a direct pull from my database. So the array comes in the format of my structure (index = field name, values = field values) array_count_values() I saw this function but I don't see how that will work for a multidimensional array? Unless if possibly I can just merge everything into a single array while keeping their original indexes & values?
  14. I have an array with something along the lines of.. Array ( [0] => Array ( [name] => Michael ) [1] => Array ( [name] => Michael ) [2] => Array ( [name] => Jordan ) [3] => Array ( [name] => Marie ) [4] => Array ( [name] => Marie ) [5] => Array ( [name] => Michael ) ) My final result should produce an array something like.. Array ( [0] => Array ( [Michael] => 3 ) [1] => Array ( [Jordan] => 1 ) [2] => Array ( [Marie] => 2 ) ) Or something like that. I have a pretty good idea that'll i'd need to use foreach twice to get 2 layers 'deep' but i'm just stuck from there.
×
×
  • 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.