Solved

PHP Curl session cookies problem

Posted on 2008-06-13
3
1,315 Views
Last Modified: 2011-09-20
Hello, i have problem with cURL.
i have
//through this link logging
$url1 = "http://mysite.com/login.php?username=aaaaa&password=bbbbb";

//Later parsing some info from here
$url2 = "http://mysite.com/members_area.php";

How can i make, that it login first, and it save cookies to .txt or SESSION, and when cURL goes to $url2, it keep alive that session, the one with which logged in.
0
Comment
Question by:springfresh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
afzz earned 500 total points
ID: 21780606
Try this
http://mysite.com/login.php
 
<?
session_start();
$_SESSION['username']=$_REQUEST['username'];
$_SESSION['password']=$_REQUEST['password'];
?>
 
http://mysite.com/members_area.php
 
<?
session_start();
echo $_SESSION['username'];
echo $_SESSION['password'];
 
?>

Open in new window

0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question