Jump to content

justsomeguy

Moderator
  • Posts

    31,575
  • Joined

  • Last visited

  • Days Won

    77

Posts posted by justsomeguy

  1. I don't know of a way to do that with a query.  I think you need a stored procedure or you get all of the relevant data and then process it with another language on the server.  Maybe there's a way to do it with a basic query, but it would be pretty complex and I'm not sure how you'd go about it.

  2. For whatever reason the filename you're sending to getimagesize is empty.  If you copied that code without changing it then that could mean the file was too large.  The code they have doesn't really do any error checking.

  3. You would only have a list of keys, you wouldn't know which level they're at.  If there are duplicate keys you wouldn't know either.

    If you want to do that though, why is not using recursion a requirement?

  4. Is Inmotion your host?  I've never set up htaccess to use a proxy at all, I didn't even realize that was an option frankly.

    Regardless, if the URL is changing then it sounds like it's not even using that rule.  I can't say why, because I'm not sitting there watching you, but maybe there is another rule.  Do you have anything else in htaccess?  Is your site set up to look at the domain and redirect to another one?

    The pattern is syntactically correct.

    Is it?  Go through that pattern and tell me what each part means.  Also tell me why you're using a replacement for the domain name, and what that replacement is going to be.

  5. I don't think you can do that with a basic query, maybe a stored procedure would work or else you would need to get all of the results and use another language to go through the data.

  6. You didn't say which database you're using, but at least in MySQL if you make that field an enum field, and define the values in the order in which you want them listed, then that's the order if you sort by that field.

  7. Have you looked at any of their documentation at all?

    https://developers.google.com/youtube/

    https://developers.google.com/youtube/documentation/

    https://developers.google.com/youtube/player_parameters

    https://developers.google.com/youtube/v3/getting-started

    If you can't find what you're looking for there, then maybe YouTube doesn't allow it.  If they don't allow it, then you need to write software to take a YouTube URL, get the video content, and write it to a file.

    If you don't know how to do any of that, then why are you trying to build a site to do it?  You'll need to learn whatever you don't already know.

  8. Look at YouTube's documentation.  If other sites are doing it then obviously there's a way to do it.  Start with their documentation to see what's available.

  9. The echo statement is how you send output to the web browser in PHP.  It's not the only way, but it's common.  Look at the died function, it uses echo to send messages to the browser.  You use the same method to send HTML, it's all output that goes to the browser.  You can also end the PHP code, output whatever you want, and then start PHP again.  e.g.:

    php code here
    ?>
    
    <!-- send output -->
    <!doctype>
    <html>
      <head>
        ...
      </head>
      <body>
        
    <?php 
    // start PHP again 

    Anything outside of PHP tags is considered to be output that is just sent to the browser.

×
×
  • Create New...