0

I have a question but I just give an example to make it clear I want to load any URL page, like the facebook login page, and fill the textboxes (user name and password) with data. I want to do that from PHP or Javascript.

That mean - every time my php / javascript page will be loaded, the facebook login page will show and the textboxes automatically filled with data

can i do that? i know the browser (CHROME or EXPLORER) do that but maybe it's possible only with browser and not with PHP / JS ?

2 Answers 2

1

Javascript is out of the question as you cannot load your Javascript when the Facebook page loads. And if you're thinking iframe the browser will prevent the Javascript in one frame from working in another frame, if it is not from the same domain.

If it is for Facebook, you should really look into their API. Many sites (like this one) now allow users to login using their Facebook login, so the API may be the easiest route. Also for major sites, like Facebook, there maybe some third party libraries that could help.

Now if Facebook is just an example and you need it for some other sites, it might be possible with PHP using cURL or maybe SOAP, but it could be very tricky. You need to realize that hackers will use similar techniques for brute force attacks, to find usernames and passwords. So sites like Facebook have done several things to limit the possibility of auto filling a login form (or any form). Also, for major sites like Facebook, using these techniques might be a violation of the terms of service, so you should check into that first.

Sign up to request clarification or add additional context in comments.

Comments

1

If this is for yourself, you can write javascript:code in your bookmart and execute it everytime you open Facebook (or other page) for example

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.