[php help] communicating to and from remote server menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Alfalfa's Avatar Legendary
    Reputation
    751
    Join Date
    Feb 2013
    Posts
    669
    Thanks G/R
    70/79
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [php help] communicating to and from remote server

    Hey all

    I'm trying to make a php page that will log in to a remote server. I successfully got it to login via just a url (like http://example.com/login?user=NAME&pass=PASS), however, when making it perform a search or some other request I am greeted with a 400 bad request error. Am I supposed to be saving session id or something? I was just resending a request I previously made.

    Also to test this locally should I use xamp or wamp? My host's php config doesn't allow remote connections.

    Thanks.

    [php help] communicating to and from remote server
  2. #2
    ProbablyEngine's Avatar Contributor Lead ProbablyEngine Dev CoreCoins Purchaser
    Reputation
    160
    Join Date
    Mar 2008
    Posts
    64
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're gonna need cURL

    PHP: cURL - Manual

    PHP Code:
    $url 'http://example.com/search.php';

    $fields = array(
        
    'terms' => 'something to search for',
    );

    $ch curl_init();

    curl_setopt($ch,CURLOPT_URL$url);
    curl_setopt($ch,CURLOPT_POSTcount($fields));
    curl_setopt($ch,CURLOPT_POSTFIELDS$fields);

    $result curl_exec($ch);

    curl_close($ch); 
    Last edited by ProbablyEngine; 02-03-2014 at 04:47 PM.

  3. #3
    Alfalfa's Avatar Legendary
    Reputation
    751
    Join Date
    Feb 2013
    Posts
    669
    Thanks G/R
    70/79
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by phelpsben View Post
    You're gonna need cURL

    PHP: cURL - Manual

    PHP Code:
    $url 'http://example.com/search.php';

    $fields = array(
        
    'terms' => 'something to search for',
    );

    $ch curl_init();

    curl_setopt($ch,CURLOPT_URL$url);
    curl_setopt($ch,CURLOPT_POSTcount($fields));
    curl_setopt($ch,CURLOPT_POSTFIELDS$fields);

    $result curl_exec($ch);

    curl_close($ch); 
    Ah thank you

Similar Threads

  1. [Help] Ascent world and login server problem
    By Ellenor in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 08-11-2008, 07:07 PM
  2. [+ 3 REP] To go on Msn Remote Assistance and Get My Server Public Again
    By mafiaboy in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 01-26-2008, 09:48 PM
  3. Greengiant and chrispee priv server setup help
    By majornoob in forum WoW EMU Guides & Tutorials
    Replies: 1
    Last Post: 01-01-2008, 01:15 AM
  4. Need help with website and server
    By Ukrajinc in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 12-26-2007, 08:41 PM
  5. Remote server, cannot connect from admin computer!?
    By Bladevil in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 09-22-2007, 05:09 AM
All times are GMT -5. The time now is 07:49 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search