![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| So, I'd like to create the following scenario: 1) Use cURL library within PHP (cURL + "Cookie Jar", et.al) to create a virtual browser session that "logs in" to a remote site. (For example: here: http://curl.haxx.se/libcurl/php/examples/cookiejar.html and here: http://curl.haxx.se/libcurl/php/exam...bay_login.html 2) Save the login credentials -- cookies, session vars, whatever -- and pass that to the web browser so that now the web browser is logged in. Is that possible? How can one take the values in the cookie jar and create the same cookies in the browser session? etc. Thanks! -- JDS | |||
| | #2 | ||
| On May 15, 6:01 pm, JDS <jeff...@invalid.address> wrote: > So, I'd like to create the following scenario: > > 1) Use cURL library within PHP (cURL + "Cookie Jar", et.al) to create a > virtual browser session that "logs in" to a remote site. (For example: > > here:http://curl.haxx.se/libcurl/php/examples/cookiejar.html > > and here:http://curl.haxx.se/libcurl/php/exam...bay_login.html > > 2) Save the login credentials -- cookies, session vars, whatever -- and > pass that to the web browser so that now the web browser is logged in. > > Is that possible? > > How can one take the values in the cookie jar and create the same cookies > in the browser session? > > etc. > > Thanks! > > -- > JDS in the traditional model of client<->server1.com<->server2.com the credentials (if stored as cookies) will only be valid for domain server1.com, so you cannot hand off the credentials to the client however if you use some client side scripting to map only part of server2.com's domain space to server1.com the rest making a straight through connection to server2.com then it is possible under certain circumstances. (those being that server2.com uses the session id as an authentication token) For instance: foxy proxy within firefox, which proxies a request for a URL matching server2.com/login.php via a machine on which server1.com runs AND vhost server2.com, and which has a DNS/host entry for server2.com pointing to itself. This machine makes a cURL requests logging on to server2.com using its real IP address. It returns the credentials to the client back though the proxy, meanwhile all the images and so forth have been downloaded from the server2.com to the client unproxied. The cookie would then appear to have been sent by a header from the correct host and now you can continue using server2.com from the client and the client will send the correct cookie. I have tested this and use it routinely to overcome same domain restrictions in order to inject code into the webpages I view to make the user experience better for me, removing adverts or simply returning a larger dataset, etc... for fun rather than for profit. There are of course situations in which this technique would not work, but give it a go. | |||
| Featured Websites | ||||
|
![]() |
| Tags: browser, credentials, curl, login, pass, possible, remote, site, then, using |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hacking the Wii remote and games to work with a PC | Darksat | Gaming Questions | 10 | 09-03-2007 5:11 PM |
| Login and remember me | Mike | PHP | 2 | 05-20-2007 6:33 PM |
| Free Online Games to Pass the Time | FilleFolle | The Games | 4 | 06-25-2006 7:59 PM |
| Getting some-one elses runescape pass-word fro jagex | 0verloader0 | Help And Cheats | 4 | 06-25-2006 3:49 PM |
| Featured Websites | ||||
|