turkman Posted August 1, 2008 Share Posted August 1, 2008 Logging onto websites and performing tasks? I always assumed it was just for your own server but some threads ive been seeing seem to suggest it can connect to other websites. Would it be possible to create a php file that logs into a web forum and posts or something like that? Quote Link to comment Share on other sites More sharing options...
ronnie88 Posted August 1, 2008 Share Posted August 1, 2008 sure just have to edit your db connection from localhost to the ip you want and insert into the forum table. i.e. <?php /** * Connect to the mysql database. */ $conn = mysql_connect("IP_OF_THE_SERVER", "username", "password") or die(mysql_error()); mysql_select_db('database_name', $conn) or die(mysql_error()); ?> Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted August 1, 2008 Share Posted August 1, 2008 Would it be possible to create a php file that logs into a web forum and posts or something like that? Yup. You can do it with cURL. Quote Link to comment Share on other sites More sharing options...
turkman Posted August 1, 2008 Author Share Posted August 1, 2008 Thats really cool and adds a whole extra dimension to php for me. I post on quite a few forums, im gonna try and make a bot for one. Not to spam or anything. Just to try and read from it and reply to a command I used to make yahoo bots to sit in chat rooms and take commands to google things and display the results on the page, it was very hard this seems alot easier. Quote Link to comment Share on other sites More sharing options...
Monk3h Posted August 1, 2008 Share Posted August 1, 2008 Getting the database user/pass/name for these forums would be very difficult and most probably illegal if the owner doesn’t just hand them over (which wouldn’t be very smart). I Think you got a bit confused. Quote Link to comment Share on other sites More sharing options...
turkman Posted August 1, 2008 Author Share Posted August 1, 2008 Yea i just came back on to say that. I got mixed up that cant be right. Initally i was thinking more along the lines of using header(Www.webname.com/viewforum.php) Then somehow reading the content from there or sending $post information with my forum username and password to whatever page recieves the post information. Would something like that work? Quote Link to comment Share on other sites More sharing options...
ronnie88 Posted August 1, 2008 Share Posted August 1, 2008 not in php, well not that I know of Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted August 1, 2008 Share Posted August 1, 2008 Yea i just came back on to say that. I got mixed up that cant be right. Initally i was thinking more along the lines of using header(Www.webname.com/viewforum.php) Then somehow reading the content from there or sending $post information with my forum username and password to whatever page recieves the post information. Would something like that work? Yes. That's exactly how a cURL request works. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.