473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

reading webpage with file_gets_content after loggin in.

hsriat
1,654 Expert 1GB
I am using file_get_contents to read the content of a page.But unfortunately, the information I actually need to filter out is only shown if I am logged in.

Any solution for how I can read the page after I do the login?

Thanks
Sep 15 '09 #1
5 1988
Dormilich
8,658 Expert Mod 8TB
pass the login and password along with the url.

Expand|Select|Wrap|Line Numbers
  1. http://login:password@domain.tld:port/
Sep 15 '09 #2
hsriat
1,654 Expert 1GB
@Dormilich
Didn't work that way. If I try using this in the browser, even then it doesn't work. It says something like "this site does not need authentication.... "

So that means this thing works with htaccess authentication, not the cookie/session authentication.
Sep 15 '09 #3
hsriat
1,654 Expert 1GB
Ok, got the solution.
file_get_contents is not the right choice but curl is!
Sep 15 '09 #4
Dormilich
8,658 Expert Mod 8TB
@hsriat
I think it’s the other way round.
Sep 16 '09 #5
hsriat
1,654 Expert 1GB
@Dormilich
If you type the link (including login:password) in your browser, you can only visit the page with htaccess, not cookies/session authentication.
Sep 17 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Michel | last post by:
Hi, This is my first post and I may be asking a question that's got a very simple explanation. I hope. I'm building a website and testing it goes fine on Netscape and Mozilla. Pixel perfect.
7
by: gino | last post by:
Dear all, My monitor was set to 1600x1200 so the fonts in IE is too small for me even when I set the "View->Text Size->Largest"... I don't have previlage to change the monitor resolution... ...
4
by: GlesgaMick | last post by:
Ok, it must be one of the most fundamentally useful things in a programming language, to be able to read and write files. I want to know how i can do this in Javascript. I want to open a text...
1
by: Brett | last post by:
I am writing a program that will allow a user to enter a webpage address into a form. Then it will download and display the webpage below the current one. example...
0
by: Yodai | last post by:
Hi all.... I am trying to reduce the code of this function and I presume there's a way to do it through a loop, buit I can't figure out how. This is what I got: an embedded processor with a mini...
0
by: EPDJ | last post by:
Well, I have to edit a program which we previously used for reading a header file to be able to read a trailer from a .dat file. The .dat file consists of 5 entries in each record and I am assuming...
7
by: dakrin | last post by:
i'm trying to programatically read the xml that is used to create a webpage through xslt transformations. I can view the XML when i go to "View Source" in internet explorer, but whenever i try...
5
by: paitoon | last post by:
Well, actually im bad in this im not sure if i post the title correctly... My problem is I make a site which people can comment the picture each other.. every comment will be sent to their email...
10
hsn
by: hsn | last post by:
hey everyone i am currntly working on a project. for a function that i want to create there are too many methods to solve it. one of these methods that i am thinking of is to write a javascript...
1
by: pankajprakash | last post by:
Hi, I have used Application Loggin Enterprise Library in a web application to write the event information in a file. The file is exist in the other location, and the web application does have have...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.