Login   Register  
PHP Classes
elePHPant
Icontem

File: process.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ehsanul Haque  >  MySpace Profile Updater  >  process.php  >  Download  
File: process.php
Role: Example script
Content type: text/plain
Description: Example PHP code that uses the class to update profile
Class: MySpace Profile Updater
Update the profile of a MySpace user
Author: By
Last change: Comment in the code changed
Date: 7 years ago
Size: 1,305 bytes
 

Contents

Class file image Download
<?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>";

?>