Skip to content
WJunction - Webmaster Forum

how to get variable info after login using php

Status
Not open for further replies.
hi guys,
we use file_get_contents in php script to get content from page, but how to get info after login....?

that is, it ask for password to access page, how to login using php itself and get the data.....??

Thanks
 

9 comments

Thanks soft and humo :)

created a small script using curl,now able to login, storing cookies in text, and
got static page after login

Note:
now only i understood how all bots collecting info and RSS.
if CURL is not available means, then NO BOTS.

EDIT1:
DDOSING site is also possible using curl, i think so :(
(i don't do any ddos, i am still a php learner - f**ck you vtc, no curl tut there.)


EDIT2:
1) any solution for site with captcha during login...??
 
Last edited:
@torrfriend: there are 2 solutions for captcha:
- ocr, which you can't really rely on. also there is no real good implementation for it in php
- decaptcher or similar captcha breaking apis. these are basically apis where on the other end real people are breaking the captchas for you. you have to pay for it on a per captcha basis
 
thanks for reply guys

now i have 2 questions

1) will the username/pass is send each time to target site for retrieval of data.....?? or just use username/pass for first time, then store in cookie.txt and use for whole session or whole day........??

2) i am here to type captcha, so any way to display the captcha to me, so i can type in box and send it back
 
1) You can use the cookie till its valid. Have to check what is its expire date. It works the same way like the cookies in your browser, except the session cookies stay there. In your place I would simply do the login every time you need the data.

2) It's possible, but it needs some coding to make it.
get the form page > save the captcha image > display for yourself > type in and send > PHP curl posts all the data, including captcha
 
so is it possible to to get cookies (copy from browser) and paste in cookiefile....??
then we can escape from login in curl and get contents .....??
 
I guess its possible if you use the correct format.

---------- Post added at 04:15 PM ---------- Previous post was at 03:58 PM ----------

BTW,
Note:
now only i understood how all bots collecting info and RSS.
if CURL is not available means, then NO BOTS.

EDIT1:
DDOSING site is also possible using curl, i think so :(
(i don't do any ddos, i am still a php learner - f**ck you vtc, no curl tut there.)

Try to learn Regex, for me that was another of this kind of "revelations" ;)

B-) also, it's cool to be able to understand things like
Code:
((\b[0-9]+)?\.)?\b[0-9]+([eE][-+]?[0-9]+)?\b

^4[0-9]{12}(?:[0-9]{3})?$
 
Status
Not open for further replies.

About the author

T
Active Member · Joined
Helping Others
1,559
Messages
309
Reactions
83
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom