Am i even heading in the right direction?

Discussion in 'Code Snippets and Tutorials' started by ceneret0023, Mar 22, 2009.

  1. ceneret0023

    ceneret0023 Level III

    Joined:
    Jun 10, 2007
    Messages:
    663
    Likes Received:
    15
    Location:
    under a rock
    I'm trying to make a program that'll send items via neofriend to another account and this is what i have for my send code... i know it's probably completely wrong but it's like my second or third attempt at a real program actually using an http wrapper xD

    Code (Text):
    1.  strHTML = Wrapper.GetWrapper("http://www.neopets.com/objects.phtml?type=inventory", "http://www.neopets.com/petcentral.phtml")
    2.         strID = GetStringBetween(strHTML, "<A href=""javascript:;"" onclick=""openwin(", ") return false:"">") 'Gets item ID
    3. strHTML = Wrapper.GetWrapper("http://www.neopets.com/iteminfo.phtml?obj_id=" & strID, "http://www.neopets.com/objects.phtml?type=inventory")
    4. strHTML = Wrapper.PostWrapper("http://www.neopets.com/iteminfo.phtml?obj_id=" & strID & "action=" & "give", "http://www.neopets.com/iteminfo.phtml?obj_id=" & strID)
    5. strHTML = Wrapper.PostWrapper("http://www.neopets.com/useobject.phtml" & "or_name=" & txtUser.Text, "http://www.neopets.com/iteminfo.phtml?obj_id=" & strID)
    i tried to find a destination for the two PostWrapper things but i couldn't find one and i don't quite know if i'm even close or not... If you could like point me in the right direction to do this i'm using tamperdata and liveHTTPheaders to try and find all the http stuff
     
  2. Fexxel

    Fexxel Level IV

    Joined:
    Jan 28, 2009
    Messages:
    959
    Likes Received:
    26
    Proof read...
    Look in your error box, you see a lot of syntax stuff don't you?
    Just a quick read, but you are missing a few ' and "
    For example, on the item ID thing, there needs to be a second ' I'm fairly sure. :)
    The rest of it is beyond me.
     
  3. ceneret0023

    ceneret0023 Level III

    Joined:
    Jun 10, 2007
    Messages:
    663
    Likes Received:
    15
    Location:
    under a rock
    i dont mean syntax stuff... that's not what i'm worried about i mean do i have like the right host/referrer/post data... i can fix the syntax stuff in like 5 min... and umm actually there aren't any syntax errors... i'm using vb6 so it may be different in vb8 but when i run the program i don't get any syntax stuff...
     
  4. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    Are you using HTTPWrapper or RIpperWrapper?
     
  5. ceneret0023

    ceneret0023 Level III

    Joined:
    Jun 10, 2007
    Messages:
    663
    Likes Received:
    15
    Location:
    under a rock
    HTTPwrapper
     
  6. ricky92

    ricky92 Administrator
    Staff Member

    Joined:
    Nov 10, 2006
    Messages:
    1,866
    Likes Received:
    67
    Code (Text):
    1.  strHTML = Wrapper.GetWrapper("http://www.neopets.com/objects.phtml?type=inventory", "http://www.neopets.com/petcentral.phtml")
    2.         strID = GetStringBetween(strHTML, "<A href=" & ChrW(34) & "javascript:;" & ChrW(34) & " onclick=" & ChrW(34) & "openwin(", ") return false:" & ChrW(34) & ">") 'Gets item ID
    3. strHTML = Wrapper.GetWrapper("http://www.neopets.com/iteminfo.phtml?obj_id=" & strID, "http://www.neopets.com/objects.phtml?type=inventory")
    4. strHTML = Wrapper.PostWrapper("http://www.neopets.com/iteminfo.phtml?obj_id=" & strID, "action=give", "http://www.neopets.com/iteminfo.phtml?obj_id=" & strID)
    5. strHTML = Wrapper.PostWrapper("http://www.neopets.com/useobject.phtml", "or_name=" & txtUser.Text, "http://www.neopets.com/iteminfo.phtml?obj_id=" & strID)
    There. This should work... With HTTPWrapper, the PostData is another parameter which you have to specify.
     
  7. ceneret0023

    ceneret0023 Level III

    Joined:
    Jun 10, 2007
    Messages:
    663
    Likes Received:
    15
    Location:
    under a rock
    ok thank you soooo much :) its good to know i had most of the info correct now i just gotta make sure i use it the right way :) definitely +rep :)
     
  8. ceneret0023

    ceneret0023 Level III

    Joined:
    Jun 10, 2007
    Messages:
    663
    Likes Received:
    15
    Location:
    under a rock
    sorry for the double post but this wont get seen otherwise...

    I've been working at my code for the past few days and it still wont work, i've even tried just copy and pasting your code ricky but it still wont work and i think the problem is finding the item ID. I made it so the program would just put the item ID into a label and not do anything else but the label just goes blank... i've tried messing around with what it should get between and seeing if there's anything in the page source that would confuse the GetStringBetween function and there isn't and i'm really quite confused....

    thanks in advanced :)