| | |
Query from a website with user name and password help
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hello everybody. My question is does anybody know any script commands that will allow me retrieve information from an website that has a user name and password? For example, I write a script that ask the user to enter in a user name and password, then the script goes to the website to query some information and the user doesn't need to go to the website himself to enter in the user name and password.
Well if that website that php re-enters the password in uses $_GET tags and not $_POST tags then you can simply use the file_get_contents() function to retieve the information. If however the external website uses $_POST tags then you will need to use curl.
So the basic usage of file_get_contents for communicating with an external website is as follows:
Btw, that's a fake password. Hope the above example helps.
So the basic usage of file_get_contents for communicating with an external website is as follows:
php Syntax (Toggle Plain Text)
<? $page=file_get_contents('http://www.example.com/page?user=cwarn23&pass=820578wxz56240358'); ?>
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
My favourite PC. - Oopy Doopy Do 2U2!
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` My favourite PC. - Oopy Doopy Do 2U2!
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
My favourite PC. - Oopy Doopy Do 2U2!
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` My favourite PC. - Oopy Doopy Do 2U2!
Would the example here be of any use to you?
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
My favourite PC. - Oopy Doopy Do 2U2!
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` My favourite PC. - Oopy Doopy Do 2U2!
![]() |
Similar Threads
- User name and password for DirectoryEntry (C#)
- OS10.3: User password not accepted at start-up (OS X)
- Lost Windows XP user password (Windows NT / 2000 / XP)
- insert user and password in window of Windows Autenticate Box HTML code (Visual Basic 4 / 5 / 6)
- insert user and password in window of Windows Autenticate Box HTML code (Windows NT / 2000 / XP)
- Noticed a but with Toshiba User password (Windows NT / 2000 / XP)
- HELP: User Log In From Connected in Access Database (C#)
- need help with user and password (Visual Basic 4 / 5 / 6)
Other Threads in the PHP Forum
- Previous Thread: SESSION LIFE( TIME) problem
- Next Thread: Generate excel from SQL using PHP
Views: 511 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cookies cron curl database date directory display download dynamic ebooks echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail mediawiki menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql stored structure subdomain syntax system table tutorial update updates upload url validation validator variable video web xml youtube






