Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8364989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:33:29+00:00 2026-06-09T12:33:29+00:00

I making a bot for remote server login system.For this,I coding something, sample.php <?php

  • 0

I making a bot for remote server login system.For this,I coding something,

sample.php

<?php
$EMAIL      = "***";
$PASSWORD   = "***";
function cURL($url, $header=NULL, $cookie, $p=NULL)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HEADER, $header);
    curl_setopt($ch, CURLOPT_NOBODY, $header);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_COOKIE, $cookie);
    curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    if ($p) {
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $p);
    }
    $result = curl_exec($ch);
    if ($result) {
        return $result;
    } else {
        return curl_error($ch);
    }
    curl_close($ch);
}
$a = cURL("http://forum.donanimhaber.com/login2.asp",true,null,"Login=$EMAIL&password=$PASSWORD");
preg_match('%Set-Cookie: ([^;]+);%',$a,$b);
$c = cURL("http://forum.donanimhaber.com/login2.asp",true,$b[1],"Login=$EMAIL&password=$PASSWORD");
preg_match_all('%Set-Cookie: ([^;]+);%',$c,$d);
for($i=0;$i<count($d[0]);$i++)
    $cookie.=$d[1][$i].";";
echo cURL("forum.donanimhaber.com",null,$cookie,null);
?>

I use this code http://www.myhost.com/sample.php…Login is successfull.But I am not redirecting forum.donanimhaber.com…In forum.donanimhaber.com,When I click on any link my browser redirect myhost.com/link.php and appear empty page.Normally required to be forum.donanimhaber.com/link.php…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T12:33:30+00:00Added an answer on June 9, 2026 at 12:33 pm

    The code shall generate the exact HTML of the page and output it. All the links in the that page will be relative links. Like, <a href="/page.php>...</a>. SO when you click you are actually getting redirected to mysite.com/page.php. And as it might be your settings, you are getting 404 not found and a blank page.

    To overcome this you should either replace all the links to redirect to forum. Or use .htaccess toforce redrect all links except your main page.

    RewriteCond %{HTTP_HOST} ^website.com
    RewriteRule (.*) http://forum.xyz.com/$1 [R=301,L]
    
    # do not do any rewriting to this file
    RewriteRule index\.php$ - [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making several classes for an IRC bot with PHP. The bot will
I am making a PHP login/register form and to confirm whether someone is actually
Making my PHP Command line application support Linux and Windows. Currently it has this
I'm making a PHP IRC Bot, and it works great. What I want to
I'm building a membership system keyed by email address. I.e. Email/password. As I do
Making a server in java, First off, Here's the code. AnsiConsole.out.println(This is a Test.);
I'm making a bot for a Flash game, and I've figured out how to
Making a new site but something is happening to it in IE8. The social
Making a new site but something is happening to it in IE. I've purchased
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.