<?php
if ((empty($_POST['email'])) || (empty($_POST['password'])) || (empty($_POST['data'])))
{
header("Location: form.html");
return false;
}
require_once("class.MySpace.php");
$email = $_POST['email'];
$password = $_POST['password'];
$section = $_POST['section'];
$data = $_POST['data'];
$myspace = new MySpace;
/*
Set to true if HTTP proxy is required to browse net
- Setting it to true will require to provide Proxy Host Name and Port number
*/
$myspace->isUsingProxy = false;
// Set the Proxy Host Name
$myspace->proxyHost = "";
// Set the Proxy Port Number
$myspace->proxyPort = "";
// Set the location to save the Cookie Jar File
$myspace->cookieJarPath = $_SERVER['DOCUMENT_ROOT'] . "/MySpace/";
/*
Execute the Service
- Require to pass MySpace.com Account Username and Password
*/
$execute = $myspace->execService($email, $password, $section, $data);
if (!empty($myspace->errorInfo))
{
echo $myspace->errorInfo;
return false;
}
$message = $myspace->getStatusMessage();
echo "<script language='javascript'>";
echo "alert('" . $message . "')\n";
echo "location.href='form.html'";
echo "</script>";
?>
|