» Site Navigation | | | » Advertisement | | | » Recent Threads | Ruzzykinz. Today 06:14 PM  Last post by Bex Today 06:44 PM 40 Replies, 67 Views | | | | | | | | | |  | |  | Requesting suggestions o_O |  |
12-13-2006, 09:59 AM
|
#1 (permalink)
| Underground
Join Date: Sep 2006 Location: The o great land of Nooooooreeeway Age: 20 Posts: 658
GPoints: 46 Rep Power: 7 | Requesting suggestions o_O Any ideas for Neopets programs i can make? | |
| |  | Re: Requesting suggestions o_O |  |
12-13-2006, 10:21 AM
|
#2 (permalink)
| Underground
Join Date: Nov 2006 Location: dorset, UK Age: 15 Posts: 9,168
GPoints: 4,346 Rep Power: 19 | Re: Requesting suggestions o_O money tree grabber, some auto playing games like cheat snow wars etc. those sort of games | |
| |  | Re: Requesting suggestions o_O |  |
12-13-2006, 10:50 AM
|
#3 (permalink)
| Banned
Join Date: Oct 2006 Location: Earth Posts: 854
GPoints: 6 Rep Power: 0 | Re: Requesting suggestions o_O Um... a neopoint generator sounds nice.  | |
| |  | Re: Requesting suggestions o_O |  |
12-13-2006, 10:54 AM
|
#4 (permalink)
| Underground
Join Date: Sep 2006 Location: The o great land of Nooooooreeeway Age: 20 Posts: 658
GPoints: 46 Rep Power: 7 | Re: Requesting suggestions o_O Im gonna make a money tree grabber first. "Warm up" ^^
Maybe I'll add MTG and some game players to the Neopoint gen. | |
| |  | Re: Requesting suggestions o_O |  |
12-13-2006, 04:16 PM
|
#5 (permalink)
| | | Re: Requesting suggestions o_O sounds good! | |
| |  | Re: Requesting suggestions o_O |  |
12-13-2006, 05:15 PM
|
#6 (permalink)
| Kane for mod!
Join Date: Sep 2006 Posts: 1,530
GPoints: 66 Rep Power: 9 | Re: Requesting suggestions o_O gommle your using php right?
__________________
[center] | |
| |  | Re: Requesting suggestions o_O |  |
12-13-2006, 11:57 PM
|
#7 (permalink)
| Underground
Join Date: Sep 2006 Location: The o great land of Nooooooreeeway Age: 20 Posts: 658
GPoints: 46 Rep Power: 7 | Re: Requesting suggestions o_O Ya. I gtg soon tho.
I made a VERY simple MTG. It only grabs the first item in the tree...
__________________  | |
| |  | Re: Requesting suggestions o_O |  |
12-14-2006, 01:47 AM
|
#8 (permalink)
| | | Re: Requesting suggestions o_O ^Post it when you have time ;o | |
| |  | Re: Requesting suggestions o_O |  |
12-14-2006, 10:32 AM
|
#9 (permalink)
| Underground
Join Date: Nov 2006 Location: dorset, UK Age: 15 Posts: 9,168
GPoints: 4,346 Rep Power: 19 | Re: Requesting suggestions o_O wow thanks for that I have been looking for one for ages! | |
| |  | Re: Requesting suggestions o_O |  |
12-14-2006, 12:16 PM
|
#10 (permalink)
| Underground
Join Date: Sep 2006 Location: The o great land of Nooooooreeeway Age: 20 Posts: 658
GPoints: 46 Rep Power: 7 | Re: Requesting suggestions o_O Here's the functions I'm using in my programs: PHP Code: <? /* curl.function.php Gommle gommle@gmail.com msn: datafrik2003@hotmail.com */
//--------------------------------------------\\ ##### ~ cURL function ~ ##### #----------------------------------------------# // Function to send requests using Curl // Builtin cookie handling for *nix systems. // For Wintendo you need to edit the path in // CURLOPT_COOKIEJAR and CURLOPT_COOKIEFILE
## Usage ## // $html = curl( 'http://freakforum.nu/login.php', // 'user=lolol&pass=lolol', // 'http://freakforum.nu/', // '12.34.56.78:8080' ); # Only the first param is needed to fetch a page. # Get that should be included in the first param. 'http://lol.com/?page=rofl' # The second is POST data, in the same format as GET. # Referer: The page you "came from". # Proxy: If your server gets banned from some online game function curl($url, $data='', $referer='', $proxy='') { // Make config available global $config; // Initiate Curl $ch = curl_init(); // Set URL do fetch curl_setopt($ch, CURLOPT_URL, $url); // Set User Agent to remote browser curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER[HTTP_USER_AGENT]); // Follow location headers curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // Set referer if($referer) { curl_setopt($ch, CURLOPT_REFERER, $referer); } // Don't return data immediately curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Get cookies from this file curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/'.$_SERVER[HTTP_REMOTE_ADDR].'cookie.txt'); // Load cookies from this file curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/'.$_SERVER[HTTP_REMOTE_ADDR].'cookie.txt'); // Use a proxy if set if($proxy) { curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_PROXY, $proxy); } // Set POST options if data is specified if($data) { // Use method POST curl_setopt($ch, CURLOPT_POST, 1); // POST this data curl_setopt($ch, CURLOPT_POSTFIELDS, $data); } $data = curl_exec($ch); return($data); } ###################################################
//--------------------------------------------\\ ##### ~ getbetween function ~ ##### #----------------------------------------------# // This function gets the string between two other strings. ## Usage: $str = getbetween('this is a string', 'is', 'string'); ## Returns: $str = ' a '; ## Originally found on the PHP mailing list. function getbetween($source, $beginning, $ending, $init_pos=0) { // Find the position where the beginning string starts, # and add the strlen of it to get the needle pos $beginning_pos = strpos($source, $beginning, $init_pos); // Get the pos where the needle starts $middle_pos = $beginning_pos + strlen($beginning); // Get the pos where the needle stops $ending_pos = strpos($source, $ending, $beginning_pos + 1); // Substr the str start and end poses. $middle = substr($source, $middle_pos, $ending_pos - $middle_pos); return $middle; #duh } ################################################### ?> Here's the simple MTG. You will most likely only get junk though. The error messages are wrong too, and may return the whoe Neopets page.
You get items tho. Just check your inventory if it says it "Didn't grab" something good. PHP Code: <? session_start(); ?> <h1> Money tree grabber</h1> <?php /* mtgrab.php Gommle gommle@gmail.com msn: datafrik2003@hotmail.com */
##### CONFIG ####### // Neopets username if($_POST['user'] && $_POST['pass']) { $config['username'] = $_POST['user']; // Neopets password $config['password'] = $_POST['pass']; // Sleep time after each grab $config['sleep'] = 2; $_SESSION['config'] = $config; } else { $config = $_SESSION['config']; } if($_SESSION['config']['username'] && $_SESSION['config']['password'] && $_SESSION['config']['sleep']) { // Include the curl and getbetween functions include( 'curl.function.php' ); // Login to neopets $html = curl( 'http://neopets.com/login.phtml', # <- Login page "username=".$config['username']. "&password=".$config['password']. "&destination=".'/donations.phtml', 'http://neopets.com/hi.phtml' ); echo 'Loggin in...<br />';
$i = 5; while($i < 10) { // Grab first item in tree // Fetch the money tree page // Login to neopets $html = curl( 'http://neopets.com/login.phtml', # <- Login page "username=".$config['username']. "&password=".$config['password']. "&destination=".'/donations.phtml', 'http://neopets.com/hi.phtml' ); // Get the link ot the item $grabitem = getbetween($html, "td width=120 align=center valign=top><a href='", "'><img src="); // Add the relative link to the absolute link $grablink = 'http://neopets.com/'.$grabitem; // Figure out which item you are trying to grab $item = getbetween($html, ' border=1></a><br><b>', '</b><br>(donated by '); // Grab the item $html = curl( $grablink, NULL, 'http://www.neopets.com/donations.phtml'); // Check if you got the item. if(getbetween($html, 'moneytree','success.gif') == '_') { echo "You got $item!<br />"; } else { echo "Couldn't grab $item, or you have grabbed the max amount of items today.<br/>"; } ob_flush(); // show output immediately. flush(); sleep(3); $i++; } // while
} // config exists ?> <form action="?" method="post"> Username:<input type="text" name="user" value="<? echo $_SESSION['config']['username']; ?>" /> Password: <input type="password" name="pass" value="<? echo $_SESSION['config']['password']; ?>" /> <input type="submit" value="Grab items!" /> </form>
__________________  | |
| |  |  | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | |