1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Go to url script help

Discussion in 'PHP & Perl' started by redmoon, Jan 28, 2011.

Tags:
  1. redmoon

    redmoon Regular Member

    Joined:
    Aug 19, 2009
    Messages:
    245
    Likes Received:
    73
    I have a list of links I want to navigate to on a social network. It's the direct link to adding friends. Does anyone know how I would write a PHP script to go to all the urls in the browser one by one, or better yet a script that will hit all the urls while I'm logged in so it adds everybody on the list?
     
  2. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    first you have to write the code which will log you in at the social network
    the you call all the links by using foreach in php

    Sorry, you gave too little info
     
    • Thanks Thanks x 1
  3. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    Give me a shout - I can do it in Ubot for you if you want.
    Feeling generous today so will give it for free :D

    Send me a sample of the links you will be visiting as well as the site you are logging into. I may be able to do the login bit as well so you can do it on different accounts.

    Cheers
    FB
     
    • Thanks Thanks x 1
  4. madoctopus

    madoctopus Supreme Member

    Joined:
    Apr 4, 2010
    Messages:
    1,249
    Likes Received:
    3,498
    Occupation:
    Full time IM
    Step 1: Learn cURL
    Step 2: Implement

    That's it. Am I being an ass? Maybe, but did you even tried doing it? What you want is trivial, but you need to learn first, look at cURL examples, etc.

    When you have specific questions (not like this one) connect on IRC to server irc.freenode.net and join channel #php where there are lots of PHP coders who can help you as long as you don't ask generic or silly questions.
     
    • Thanks Thanks x 1
  5. redmoon

    redmoon Regular Member

    Joined:
    Aug 19, 2009
    Messages:
    245
    Likes Received:
    73
    Appreciate the generosity fatboy! I'll pm you with the info. Thank you!

    ___

    Nope madoctopus you're not being an ass. I should've been more detailed in what I was trying to do. I'm new to the PHP language so I thought the less I said, the less dumber I'd sound. (guess not) :D

    What I did was I ran a simple script to sort users ids in numerical order (/add-friend/11389, /add-friend/11390, etc.) The url points to the "add a friend" button for each user. What I ended up with was a list of urls to add members easily, but I have no idea how to create a script to login and go to the urls. Thanks for the link and I'll look for some tutorials on cURL.


     
  6. redmoon

    redmoon Regular Member

    Joined:
    Aug 19, 2009
    Messages:
    245
    Likes Received:
    73
    I got the bot and it works FLAWLESSLY!!! It only took him 30 minutes tops to make after I contacted him, and it does exactly what I needed. Thanks bro + rep given. If anyone needs a custom bot fatboy is your guy! I know I'll be hiring you without a doubt!

     
    • Thanks Thanks x 1
  7. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    Cheers and glad its working for you :)
     
  8. headliner

    headliner Registered Member

    Joined:
    Oct 2, 2009
    Messages:
    51
    Likes Received:
    5
    Gonna post the code? Could always use the snippets... LOL :D

    -HL