Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 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
    Regular Coder
    Join Date
    May 2002
    Location
    London, England
    Posts
    369
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Regular Coder
    Join Date
    May 2002
    Location
    London, England
    Posts
    369
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #5
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    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)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •