| | |
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. - MacGyver Fan
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` My favourite PC. - MacGyver Fan
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
My favourite PC. - MacGyver Fan
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` My favourite PC. - MacGyver Fan
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. - MacGyver Fan
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*` My favourite PC. - MacGyver Fan
![]() |
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
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary body broken cakephp checkbox class cms code cron curl database date date/time directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link list login loop mail menu mlm mod_rewrite msqli_multi_query multiple mycodeisbad mysql oop parse paypal pdf php problem query radio random recursion regex remote script search send seo server sessions sms soap source space sql static structure syntax system table tutorial update upload url validation validator variable video web webdesign wordpress xml youtube






