Jump to content

Can php be used for


turkman

Recommended Posts

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?

Link to comment
Share on other sites

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());

?>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.