473,423 Members | 1,786 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,423 software developers and data experts.

Need autologin facility to other site.

nilayanand
My page has the link to take user directly to report page of other site. Clicking report link ask user (in browser authentication dialog box) to submit user, password, before showing report page. Our site has the user password stored in database and I just want to submit user/password internally so user won’t be asked for it.
Is there any way to do it through php?


Thanks in advance
Nov 26 '06 #1
5 2042
bno
8
My page has the link to take user directly to report page of other site. Clicking report link ask user (in browser authentication dialog box) to submit user, password, before showing report page. Our site has the user password stored in database and I just want to submit user/password internally so user won’t be asked for it.
Is there any way to do it through php?


Thanks in advance
store inputted variables with POST method, or could use a session or a cookie to track logged in status?
Nov 27 '06 #2
swandi
13
I think you could use curl
[PHP]
<?php
$url = "http://nm.del.ac.id/?act=login";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt ($ch, CURLOPT_POST, 1);
//to enable POST
curl_setopt ($ch, CURLOPT_POSTFIELDS,"name=name&password=password&lo g=1");
//set the post value, you need to know the post field in the other site
curl_exec($ch);
?>
[/PHP]
Nov 27 '06 #3
cURL can pull the data, but can't follow the post via redirecting.
Nov 27 '06 #4
cURL can pull the data, but can't follow the post via redirecting.
ya same think i want.....it's perl it's possible using
mechanize; module folow link is there.any one konws auto login in php
Nov 28 '06 #5
If all you want to do is login into a single page and I'm guessing that has it's own form that sends off. If you have the users enter the information that the other page request, basically mimic that page, you can use cURL twice and accomplish the goal. Use both right after each other in the same file and you can login then submit their form. Note: login via cURL does not always work, typically because the remote server check the referer or is trying to set cookies and doesn't because of security reasons.
Nov 28 '06 #6

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

Similar topics

21
by: Chris Reedy | last post by:
For everyone - Apologies for the length of this message. If you don't want to look at the long example, you can skip to the end of the message. And for the Python gurus among you, if you can...
12
by: Matt Garman | last post by:
I'd like to create a "custom output facility". In other words, I want an object whose use is similar to std::cout/std::cerr, but offers more flexibility. Instead of simply writing the parameter...
4
by: Speaking Clock | last post by:
Hi, I have recently taken over the responsibility for a medium sized .org website that has been written entirely in .asp. Because there is a highly restrictive proprietary Content Management...
4
by: KiwiBrian | last post by:
What do you recommend for an application I can host on a web site that can provide a site search facility? I thought I read that Google had a new aplication for this but I can't find any reference...
8
by: Keith Smith | last post by:
I know this is a little off topic but I hope it is still acceptable to this forum. Please read this carefully. I am not looking for a quick answer - I am hoping to find someone who has been in my...
2
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public...
2
by: Alan Silver | last post by:
Hello, I am in the planning stages of a new ASP.NET web site, and would like to know if it's possible to add a search facility to it. The site will be a mixture of static pages and ones...
14
victorduwon
by: victorduwon | last post by:
Hi guys and gals, I am using javascript to autologin to my google analytics account via a hyperlink. This is what the text looks like this <?xml version="1.0" encoding="utf-8"?>...
5
by: vashafnas | last post by:
Hello all, I have an autologin feature in the login form.So if autologin selected once,it should work using cookies then.How to use it.Please help???
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.