Results 1 to 4 of 4

Thread: Posting to Curl with post params from server

  1. #1
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default Posting to Curl with post params from server

    Heres what I am trying to acomplish. I need to automate making databases from a php script. My host doesnt have an API for this and the control panel is proprietary to them.

    Currently my script will post my username/pass over using cookies and display a secure page.

    So now I need to post to a secure page inside the web manager.
    Only problem is this...

    The way the form process works normally is a 2 step process.

    First form is database name info and then once you fill that out you get redirected to domain.com/AddDatabaseUser.do

    This is the part i dont understand. If the form was a one step process I would understand. So my question.

    How do I post first to domain.com/AddDatabase.do and then post to domain.com/AddDatabaseUser.do and keep the posted info from the web hosting server to stay posted to the 2nd form page "domain.com/AddDatabaseUser.do"?

    Thanks,
    Ben

  2. #2
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    I wonder if this is what I am looking for?

    http://www.php.net/manual/en/functio...multi-init.php

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I don't know what the restrictions are on your host, but many/most don't allow this. Even if it does, there may be a limited number available. And it also makes keeping track of it difficult.
    This is why all major php packages that use mysql don't do that: instead, they just add a prefix like package_ before all of the table names.
    I'm not sure if this works for you, and it might end up making a huge database, but unless you are creating a server trying to give access to one database for each user, then the prefix method will probably be a lot easier for you.

    As for executing a request without the browser going there, yes, curl will do that. It also would be hidden from the user so that would mean that you can do it somewhat securely: check the IP of the request, etc.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    I just got it to work about 10 minutes ago. Had a buddy help me out with it.

    I don't want a really small database nor do I want a huge database. I will probably end up prefixing 20 customers to one db.

Bookmarks

Posting Permissions

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