Web Analytics Made Easy -
StatCounter remote GD version testing - CodingForum

Announcement

Collapse
No announcement yet.

remote GD version testing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • remote GD version testing

    Basically running up a gallery package that relies heavily on them
    there GD libraries and figured on using a code to ftp the package
    directly from my server to the recipients (basically a form asking
    for their ftp address and password - for those who trust me not
    to keep a copy - and then establish a conxion and send the
    file(s) ). That's the easy bit.

    I wondered if I can test whether their server has GD libraries and
    which version they have, before sending the lot.

    Brad did a phpinfo read test script that can do it locally - so is
    there a way to read a remote servers phpinfo?

    Or would I need to send the script, load it into a frame and
    bounce the variable I need back to the holding page (assuming
    I can even do that) ???

    Any ideas before I run down too many dead-end possibilities?
    ضkii - formerly pootergeist
    teckis - take your time and it'll save you time.

  • #2
    The easier way to do it, would be that they download an index.php page with a form on it...

    They fill in teh form with username, pass, ftp address and that contacts your site et voila

    Before you send teh info, check for GD library, and version, then alert them to the fact that it might not work before pressing a proceed button should they want to proceed

    One thing.. most shared servers have outgoing connections through PHP switched off.. i.e., sockets is off..

    Jee
    Jeewhizz - MySQL Moderator
    http://www.sitehq.co.uk
    PHP and MySQL Hosting

    Comment


    • #3
      Aha - brilliant

      So I just tell them to d/l grabfiles.php and upload it to a new nicely chmodded folder called 'gallery' on their server and it posts the info back to me -

      2 more questions - anyway to encrypt the data effectively and decrypt at my end (other than mCrypt) ?
      - can I test for open sockets in scripting?
      ضkii - formerly pootergeist
      teckis - take your time and it'll save you time.

      Comment


      • #4
        The grabfile.php can auto-chmod the directory using chmod() (suprised?!) www.php.net/chmod

        And to encrypt/decrypt you're gonna need to use something like mcrpyt... obv md5 won't work.. unless you use some serious coding, and mail it to the server, then use PHP to parse the mail message and retrieve the data, but that's more hassle then its worth

        Jee
        Jeewhizz - MySQL Moderator
        http://www.sitehq.co.uk
        PHP and MySQL Hosting

        Comment


        • #5
          Jees idea is cool - let them upload a test file to the server and
          you can fopen() that to see what they got !


          if(function_exists ($some_gd_function)){
          echo "gotGD";
          }

          sockets etc are different as the socket functions may well be
          compiled in but still unavailable so they may show up but be
          unusable , that is also the problem with CHMOD & CHOWN functions they are often disabled on shared hosting (but may still appear to exist).


          as for security check out if your server has sftp (most/*NIX hosts
          will) which will alow you to use a secure FTP connection, only
          downside is you will have to exec() or system all the commands

          ( http://www.nevis.columbia.edu/cgi-bin/man.sh?man=sftp )
          resistance is...

          MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

          Comment

          Working...
          X