GamerzPlanet - For All Your Online Gaming Needs!!

Go Back   GamerzPlanet - For All Your Online Gaming Needs!! > Programming/Web Design > Web Design

Web Design Discuss anything about web language such as HTML, PHP etc.



How to start on a web bot ?

Web Design


Reply
 
Thread Tools Display Modes
Old 06-03-2008, 02:36 PM   #1
WoW forum pro moderator
 
Last Online: 10-06-2008 02:58 PM
Join Date: Nov 2005
Location: Dubai
Posts: 1,372
Thanks: 0
Thanked 249 Times in 41 Posts
Akutski is an unknown quantity at this point
iTrader: 0 / 0%
Points: 16,257.81
Bank: 15.00
Total Points: 16,272.81
How to start on a web bot ?

Hey guys, I was looking for a way to create a web bot that basically copies a link from one site and copies it to another site. There are a lot of links so the bot has to go through the names systematically. It will also have to go to certain pages for each different links which I will hard code into the bot itself. Example, if this name is copied then place it in this page etc... As a noob to PhP I would like to know what these kind of bots are called so that I may search for tutorials for them on google. Or if anyone would be kind enough to link me with tutorials that may help me with this kind of coding, it would be greatly appreciated. Thanks.
Akutski is offline   Reply With Quote
The Following User Says Thank You to Akutski For This Useful Post:
Dokurochan (06-12-2008)
Sponsored Links
Old 06-03-2008, 02:58 PM   #2
Registered User
 
Join Date: Nov 2007
Posts: 2,456
Thanks: 60
Thanked 859 Times in 411 Posts
x1nixmzeng is on a distinguished road
iTrader: 0 / 0%
Points: 4,690.94
Bank: 18,911.25
Total Points: 23,602.20
  
Re: How to start on a web bot ?

You mean you want to parse links from another site?

Assuming so, with a language like PHP you'd fetch the webpage (file_get_contents("url") or CURL - Google these) and run some Regex.

I'll bold all these terms you need to Google, but really, there is a lot of source out there.
x1nixmzeng is offline   Reply With Quote
Old 06-04-2008, 08:57 AM   #3
Moderator
 
Last Online: 10-02-2008 12:03 PM
Join Date: May 2006
Location: Denmark
Age: 15
Posts: 5,098
Thanks: 14
Thanked 1,320 Times in 398 Posts
XTZGZoReX is on a distinguished road
iTrader: 0 / 0%
Points: 6,085.40
Bank: 183,714.34
Total Points: 189,799.74
 
Xfire Xtzgzorex
Re: How to start on a web bot ?

PHP can indeed easily do this task. I think it's the way to go. Although, you will need to find a way to keep it up (like a while 1 == 1 loop) or you will have to reload it everytime you want to parse new texts/urls.
__________________
[Only registered and activated users can see links. ] - The Official GamerzPlanet WoW Server

[Only registered and activated users can see links. ]:
  • [Only registered and activated users can see links. ]
  • [Only registered and activated users can see links. ]
  • [Only registered and activated users can see links. ]
I do not give WoW Emu support via any type of private messaging anymore.
XTZGZoReX is offline   Reply With Quote
Old 06-04-2008, 02:24 PM   #4
WoW forum pro moderator
 
Last Online: 10-06-2008 02:58 PM
Join Date: Nov 2005
Location: Dubai
Posts: 1,372
Thanks: 0
Thanked 249 Times in 41 Posts
Akutski is an unknown quantity at this point
iTrader: 0 / 0%
Points: 16,257.81
Bank: 15.00
Total Points: 16,272.81
Re: How to start on a web bot ?

ok thanks for the bolded words, managed to find some really good sites about parcing. That was the word that really helped in my searches btw XD. Now just one last thing to get me going.... whats the easiest and fastest way to setup a PhP server to test out my scripts ? I know of apache but are there any simpler ones just to test my scripts on ?
Akutski is offline   Reply With Quote
Old 06-04-2008, 06:18 PM   #5
lut
Registered User
 
lut's Avatar
 
Last Online: Today 12:36 AM
Join Date: Dec 2005
Location: Michigan
Posts: 1,589
Thanks: 1
Thanked 116 Times in 107 Posts
lut is on a distinguished road
iTrader: 0 / 0%
Points: 21,741.10
Bank: 0.00
Total Points: 21,741.10
Re: How to start on a web bot ?

the fastest way would be either [Only registered and activated users can see links. ] or [Only registered and activated users can see links. ] they are both one install apache,php,mysql servers easy to use and easy to setup.

Wamp is probably the easiest of the two.

If you want to do this an not tie up your server with a infinite loop "while(1=1)" you should enter the urls to parse into a text file then you just have to check for the end of the file "while(!file.eof)".

A parser like this can get pretty hefty depending on how far you want to go into a site. A nice way to do something like this is create a new connection for each internal link you find on a page. run the parser on each connection then close it as soon as you reach the end of a page. Keep each internal link in an array for that site so you can check to see if you have visited each link and don't go over ones you have already done.

The other way is to only search certain pages for each site and list them in your text file.

If you don't want to use a text file you can store each url in a large array and use a for loop with sizeof(myarray)-1 to go through each link.

Enjoy

Feral
lut is online now   Reply With Quote
Old 06-06-2008, 07:15 AM   #6
Moderator
 
Last Online: 10-02-2008 12:03 PM
Join Date: May 2006
Location: Denmark
Age: 15
Posts: 5,098
Thanks: 14
Thanked 1,320 Times in 398 Posts
XTZGZoReX is on a distinguished road
iTrader: 0 / 0%
Points: 6,085.40
Bank: 183,714.34
Total Points: 189,799.74
 
Xfire Xtzgzorex
Re: How to start on a web bot ?

Now that I think of it, he doesn't need to use a while loop.

He can just go through the sites, tell the bot to sleep for like 30 secs, then go through the sites again, and so on. This would be done with [Only registered and activated users can see links. ] and [Only registered and activated users can see links. ].

Update: What? I thought PHP had goto?
__________________
[Only registered and activated users can see links. ] - The Official GamerzPlanet WoW Server

[Only registered and activated users can see links. ]:
  • [Only registered and activated users can see links. ]
  • [Only registered and activated users can see links. ]
  • [Only registered and activated users can see links. ]
I do not give WoW Emu support via any type of private messaging anymore.
XTZGZoReX is offline   Reply With Quote
Old 06-06-2008, 09:34 AM   #7
lut
Registered User
 
lut's Avatar
 
Last Online: Today 12:36 AM
Join Date: Dec 2005
Location: Michigan
Posts: 1,589
Thanks: 1
Thanked 116 Times in 107 Posts
lut is on a distinguished road
iTrader: 0 / 0%
Points: 21,741.10
Bank: 0.00
Total Points: 21,741.10
Re: How to start on a web bot ?

The 'goto' for php isn't coming till version 6 and even then it's not exactly a goto but more of a break that can be pointed at an name anchor/target.


Either way a goto is just a make shift loop anyway, He could always use javascript to refresh the page after a site had been scanned but that would be pointless when a loop would work much better.

Lut
lut is online now   Reply With Quote
Old 06-07-2008, 11:55 AM   #8
Moderator
 
Last Online: 10-02-2008 12:03 PM
Join Date: May 2006
Location: Denmark
Age: 15
Posts: 5,098
Thanks: 14
Thanked 1,320 Times in 398 Posts
XTZGZoReX is on a distinguished road
iTrader: 0 / 0%
Points: 6,085.40
Bank: 183,714.34
Total Points: 189,799.74
 
Xfire Xtzgzorex
Re: How to start on a web bot ?

Well, the point of a goto + a sleep would be that the application wouldn't be as CPU-intensive when sleep'ing as when using a while loop to constantly loop through things.
__________________
[Only registered and activated users can see links. ] - The Official GamerzPlanet WoW Server

[Only registered and activated users can see links. ]:
  • [Only registered and activated users can see links. ]
  • [Only registered and activated users can see links. ]
  • [Only registered and activated users can see links. ]
I do not give WoW Emu support via any type of private messaging anymore.
XTZGZoReX is offline   Reply With Quote
Old 06-07-2008, 06:47 PM   #9
lut
Registered User
 
lut's Avatar
 
Last Online: Today 12:36 AM
Join Date: Dec 2005
Location: Michigan
Posts: 1,589
Thanks: 1
Thanked 116 Times in 107 Posts
lut is on a distinguished road
iTrader: 0 / 0%
Points: 21,741.10
Bank: 0.00
Total Points: 21,741.10
Re: How to start on a web bot ?

yea but you can use a sleep in a while loop also.
lut is online now   Reply With Quote
Old 06-09-2008, 06:48 AM   #10
Moderator
 
Last Online: 10-02-2008 12:03 PM
Join Date: May 2006
Location: Denmark
Age: 15
Posts: 5,098
Thanks: 14
Thanked 1,320 Times in 398 Posts
XTZGZoReX is on a distinguished road
iTrader: 0 / 0%
Points: 6,085.40
Bank: 183,714.34
Total Points: 189,799.74
 
Xfire Xtzgzorex
Re: How to start on a web bot ?

True enough.. True. I wonder why I didn't take of that.

Well, that is obviously the way to go; while() + sleep().
__________________
[Only registered and activated users can see links. ] - The Official GamerzPlanet WoW Server

[Only registered and activated users can see links. ]:
  • [Only registered and activated users can see links. ]
  • [Only registered and activated users can see links. ]
  • [Only registered and activated users can see links. ]
I do not give WoW Emu support via any type of private messaging anymore.
XTZGZoReX is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT -7. The time now is 12:48 AM.


Powered by: vBulletin
Copyright ©2008, GamerzPlanet.Net
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Network: GamerzPlanet | ForumzPlanet | GzPUpload | GzPArcade | GzP Host | Poker Tips | Watch Desperate Housewives | Visits: