SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a php script that auto submits to predefined forms. I am using Snoopy class for much of the process. Problem is some of the forms are within areas that I need to be authorized first. I have no problem with "basic authorization" and snoopy supports this. The problem is on sites that use other forms of authorization, like a cgi script that vaildates against a database. I can append the cgi links like:
    login.cgi?id=userid&password=password But this just gets me into the "main" site or lounge, I still need to go to another page to get to the form to submit. Since this is a php script, it does not hold state or cookies, hence my problem.

    I tried changed the form action by appending like above, but this did not work, so of course I can not submit the form as I can not authorize myself. With a browser, the sites set cookies so authorization carries over from page to page. I believe.

    So my other thought was to pass the cookie info to authorize then submit the form. Snoopy does have this feature available as such, Example:

    $snoopy->cookies["SessionID"] = 238472834723489l;
    $snoopy->cookies["favoriteColor"] = "RED";

    But the big question is how do I translate the cookie infomation to do this? I have the cookie's on my system gathered from using the browser. Example:

    a2kref
    1206
    thesite.com/
    0
    2859538432
    30859208
    4000441920
    29411480
    *
    But how do I know their naming coventions to be able to send the cookie info like the snoopy example above?

    I've been reading about cookies, but could find nothing realted to this situation. The snoopy class can also send rawheaders, but I don't understand how to use it to authorize myself? Example form the readme:

    $snoopy->rawheaders["Pragma"] = "no-cache";

    I'm just at a loss here. Anyone have any ideas or thoughts. Or others ways I could authorize myself? any help would be greatly appreciated! Thank you.

    ronnie

    P.S. Snoopy link in case anyone is interested:
    http://sourceforge.net/projects/snoopy/
    It's been a very usefull class for me..
    The largest selection of PLR Articles on the Planet!
    Many Private Label Rights Products.

  2. #2
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's an extremely tricky question. It seems the snoopy class cookie functionality is fine for PHP style name=value cookies, but that doesn't help much as the cookie you are trying to send doesn't seem to be split up into name/value pairs.

    I reckon your best chance in this case would be to try the official snoopy project forum:

    http://sourceforge.net/forum/forum.php?forum_id=6043

    Hopefully someone on here will have a solution, but this seems like such a specialised question that your best bet would be the script's developers.

    Thanks for the link by the way, Snoopy looks like a superb class and has functionality I've been looking for for quite a while

  3. #3
    SitePoint Addict
    Join Date
    Jul 2000
    Location
    North Central AR
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Skunk.

    Ya, this has been a real pain in the you know what. But if I can do the basic authorization, seems like I should be able to do any other authorization. Seems like even though I have the cookie, I don't know how to send it back, as I don't know what or how they named the infomation, because it's on their end right? Plus I was just thinking, since it is a per "session" cookie, would it work if I re-used the same cookie information?

    Any one know of anywhere I can look to try and find an anwser?

    I thought about posting in the project forum, but seeing the messages are old and many with no replies, I did'nt think I'd get much of a response. I even e-mailed the author, but the reply was no help.

    Yes, it is a great class! It's been very helpfull to me, very well done.

    Well, I hope some one reads this and has a solution or a link that might help me. This is the last hurdle to pass to finish my project. So it's quite frustrating...

    Any ideas anyone, would be very helpfull!
    Thanks.

    ronnie
    The largest selection of PLR Articles on the Planet!
    Many Private Label Rights Products.

  4. #4
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm completely stumped I'm afraid


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
  •