Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Server Side Programming > PHP Programming
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 07-05-2007, 10:29 AM
  #1
genuineskate
Paladin (Level 15)
 
Join Date: May 2006
Location: USA
Posts: 430
iTrader: (0)
genuineskate is an unknown quantity at this point
snoopy.php: login and then go to another page

Hey i've been at this for a few hours and still dont know what i need to know.

i am using snoopy.php (snoopy.sourceforge.net)

and this code with it
Code:
$snoopy = new Snoopy; 
$submit_url = "https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=10&ct=1183648830&rver=4.0.1534.0&wp=HBI&wreply=https:%2F%2Flive.xbox.com%2Fxweb%2Flive%2Fpassport%2FsetCookies.ashx%3Frru%3DhttpZ3AZ2FZ2FliveZ2ExboxZ2EcomZ2FenZ2DUSZ2FdefaultZ2EaspxZ3FWTZ2EsvlZ3Dnav&lc=1033&cb=B001033httpZ3AZ2FZ2FliveZ2ExboxZ2EcomZ2FenZ2DUSZ2FdefaultZ2EaspxZ3FWTZ2EsvlZ3Dnav&id=66262";  // the xbox live login page
$submit_vars["login"] = "username"; 
$submit_vars["passwd"] = "password"; 
$snoopy->submit($submit_url,$submit_vars); 
print $snoopy->results;
and then i want to go to :
http://live.xbox.com/en-US/profile/p...RIGHT+ME+UP+69

or
http://live.xbox.com/en-US/profile/p...pp=0&GamerTag=ANY+GAMERTAG

but for some reason it cant work. I login (i dont even know if it logs in because it does not show any notification) and then use $snoopy->fetch(http://live.xbox.com/en-US/profile/p...GHT+ME+UP+69);

and then strip it for various things but nothing comes out of it.

now i heard you can also use curl for this? If there are any other ways on how to do this pplease let me know.

If i ever get this, i will definately make a full open source project of this so that everyone looking for this like i am will be able to get it.

thanks,
-ajp
__________________
Did i help you? Rep me!
genuineskate is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-05-2007, 10:36 AM
  #2
genuineskate
Paladin (Level 15)
 
Join Date: May 2006
Location: USA
Posts: 430
iTrader: (0)
genuineskate is an unknown quantity at this point
Edit:

this reply was an accident, but i still need help on the above topic
__________________
Did i help you? Rep me!
genuineskate is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-06-2007, 01:11 PM
  #3
genuineskate
Paladin (Level 15)
 
Join Date: May 2006
Location: USA
Posts: 430
iTrader: (0)
genuineskate is an unknown quantity at this point
anyone know how to use snoopy? i really need this
__________________
Did i help you? Rep me!
genuineskate is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-12-2007, 01:37 PM
  #4
paul_norman_81
Super Deity (Level 18)
 
Join Date: Nov 2005
Location: Preston, England, UK
Posts: 1,044
iTrader: (0)
paul_norman_81 is a jewel in the roughpaul_norman_81 is a jewel in the roughpaul_norman_81 is a jewel in the rough
I have never used snoopy, but if you are seriously going to automate website interaction/scraping don't use PHP, use PERL. Head over to CPAN and look at Mechanize. This is a tool for doing just what you need. And it is massively faster that PHP. You can plug in any number of modules to do what you need, e.g. MYSQL, clean the data and stick it straight into your database ready for manipulation. It will also keep a cookie jar allowing sessions to be set and for you to move from page to page keeping all this information.

If you want to use PHP, then as far as I am aware cURL is a good way forward. I'm afraid I have only ever used it with payment systems at the command line... The principle is simple, but you need to know the location of the action of the form:

curl -d "login=username&passwd=password" www.form_processing_script.php

http://curl.planetmirror.com/docs/httpscripting.html

Hope it helps...
__________________
"Aut viam inveniam aut faciam" - I'll either find a way or make one

First Tutors | First Tutors: Music | First Tutors: I.T. | First Tutors: Languages | First Tutors: Business | First Tutors: Arts & Crafts | First Tutors: New Zealand
paul_norman_81 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-12-2007, 05:25 PM
  #5
genuineskate
Paladin (Level 15)
 
Join Date: May 2006
Location: USA
Posts: 430
iTrader: (0)
genuineskate is an unknown quantity at this point
thanks man. but how do i install mechanize on my server?
__________________
Did i help you? Rep me!
genuineskate is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-12-2007, 06:10 PM
  #6
paul_norman_81
Super Deity (Level 18)
 
Join Date: Nov 2005
Location: Preston, England, UK
Posts: 1,044
iTrader: (0)
paul_norman_81 is a jewel in the roughpaul_norman_81 is a jewel in the roughpaul_norman_81 is a jewel in the rough
You may already have perl on your server...

Type: "perl -v" (no quotes) To find your version.

If it is there, great, if not and you are using a modern Linux distro you can likely use a package manager (yum, apt-get) to install / configure perl - e.g. yum install perl.

The following guide will help you with CPAN and installing Mechanize: http://search.cpan.org/src/PETDANCE/...d-1.32/INSTALL
__________________
"Aut viam inveniam aut faciam" - I'll either find a way or make one

First Tutors | First Tutors: Music | First Tutors: I.T. | First Tutors: Languages | First Tutors: Business | First Tutors: Arts & Crafts | First Tutors: New Zealand
paul_norman_81 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-12-2007, 07:14 PM
  #7
genuineskate
Paladin (Level 15)
 
Join Date: May 2006
Location: USA
Posts: 430
iTrader: (0)
genuineskate is an unknown quantity at this point
where do i type that though? thats the thing that got me stuck. where do i type all of this?
__________________
Did i help you? Rep me!
genuineskate is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 07-13-2007, 04:11 AM
  #8
paul_norman_81
Super Deity (Level 18)
 
Join Date: Nov 2005
Location: Preston, England, UK
Posts: 1,044
iTrader: (0)
paul_norman_81 is a jewel in the roughpaul_norman_81 is a jewel in the roughpaul_norman_81 is a jewel in the rough
Okay, you need to log in to your server using ssh:

ssh user@servername.yourdomain.com (e.g. tim@maple.yahoo.com)

and enter your password for that account - you should have been given one...

You will then be at the unix shell where all of this stuff gets typed.
__________________
"Aut viam inveniam aut faciam" - I'll either find a way or make one

First Tutors | First Tutors: Music | First Tutors: I.T. | First Tutors: Languages | First Tutors: Business | First Tutors: Arts & Crafts | First Tutors: New Zealand
paul_norman_81 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Reply
KEEP TABS
SPONSORS
 
Boxedart

 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 05:22 PM.

   

Mascot team created by Drawshop.com | Web Hosting

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.