Help : Sending data to another

Discussion in 'PHP' started by pulikuttann, Jul 27, 2007.

  1. #1
    I am in a way to create a semi automatic directory submission script with php.So can anyone plz help ?

    The thing is this :

    1) First there will be a page in which we can enter the data : title,description,keywords etc (not category and captcha)

    2) When I press a button 5 or 10 sites open as tabs, with the data filled in tghe forms.And need only to enter captcha and category.

    How to do this ?

    Idea ?
     
    pulikuttann, Jul 27, 2007 IP
  2. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes, you can do this.

    You need to view the source on each of the submission pages, and look at the forms embedded.

    In particular, note down the names of all the form elements.
    Also note the url to which the form is posted.

    Then, create your own page which contains a form containing elements which are identically named. These you can pre-populate with php. (In otherwords, copy and paste the form, but code it up with php to populate the elements)

    Then, when it is submitted, it would go to where the normal page sends it. It would of course fail, because of the captcha. But most systems will then direct you back to the original form, retaining all the information, to re-request you enter the captcha.

    That way, you achieve what you want.

    Ideally, you'll need to sqelch the referrer information too - set up your browser to do this. Smart sites might not affect the post if the original form didn't come from the same site.
     
    ecentricNick, Jul 27, 2007 IP
  3. pulikuttann

    pulikuttann Banned

    Messages:
    1,839
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thankz!
    I will try to do so and ask for more doubts ): ?
     
    pulikuttann, Jul 27, 2007 IP
  4. pulikuttann

    pulikuttann Banned

    Messages:
    1,839
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #4
    How to fake referrer information ?
     
    pulikuttann, Jul 27, 2007 IP
  5. DeViAnThans3

    DeViAnThans3 Peon

    Messages:
    785
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You can only do so with cURL. Are you using cURL, or not?
    If not, its practically impossible as far as I know.

    This will do the job, if you're using cURL.
    curl_setopt($handle, CURLOPT_REFERER, "URL HERE")
    PHP:
    There is also a plugin for firefox (refspoof), however I guess that's not what you're looking for?
     
    DeViAnThans3, Jul 27, 2007 IP
  6. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It's probably not even necessary to use CURL, or to worry about the referrer.

    For example, the attached bit of HTML has the username and email address pre-filled for digg's registration page. It's copied straight out of a "view source" on digg's registration page.

    Upon clicking submit, it will take you to digg, fail their registration because some fields aren't filled in (which in reality would be just the captcha), but put you back where you need to be to complete the registration.

    If this HTML was generated by your PHP code, it would be your browser that discloses the referrer information, so CURL wouldn't help unless you route the request back through your server, and use CURL or WGET to submit the form which, in my opinion for this task, is overly complicated. Besides, if digg aren't checking the referrer, I doubt anyone else would be.

    I've attached the HTML so you can try it.

    Just run it and click the submit button and you should see what I mean.

    So, all you need to do is write some PHP which populates all the fields.
     

    Attached Files:

    ecentricNick, Jul 28, 2007 IP
  7. pulikuttann

    pulikuttann Banned

    Messages:
    1,839
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I have done a simple thing.But need more ideas.

    I just list 10 - 20 directories, each having a tick button infront, and in the bottom of that page having the form.
    After selecting the directories, and filling the form click submit button.It opens all the selected sites with the data in their forms.

    So how can I do it ?
     
    pulikuttann, Jul 28, 2007 IP
  8. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You need javascript for that as all the work is being done client side.

    The javascript will loop through and for each ticked box, change the location the form is being posted to, and also change the form's target parameter (you'll need a <target="_something"> in order to make it open a new window, so that it's something like...

    target="_digg"
    or
    target="_stumbleupon"

    ..finally, the javascript will triger the submit button, which will open a new window in the way you want.

    You should probably ask over on the javascript forum for guidance on that.
     
    ecentricNick, Jul 28, 2007 IP