| | |
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.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Would the example here be of any use to you?
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
![]() |
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 |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue phpmyadmin problem query radio random recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube






