Options saved.

'; } $checked = ''; if($ping == 1) $checked = 'checked="checked"'; echo '

URIs to Ping

The following services will automatically be pinged/notified when you publish posts. Not when you edit previously published posts, as WordPress does by default.

NB: this list is synchronized with the original update services list.

Separate multiple service URIs with line breaks:

Ping log

These are the lastest actions performed by the plugin.

'.SUP_get_last_log_entries(20).'

'; } # telling WordPress to ping if the post is new, but not if it's just been edited function SUP_ping_if_new($id) { global $wpdb, $post_title; if(get_option('SUP_ping') == 1 and get_option('ping_sites') != "") { # fetches data directly from database; the function "get_post" is cached, # and using it here will get the post as is was before the last save $row = mysql_fetch_array(mysql_query( "SELECT post_date,post_modified FROM $wpdb->posts WHERE id=$id")); # if time when created equals time when modified it is a new post, # otherwise the author has edited/modified it if($row["post_date"] == $row["post_modified"]) { if($post_title) SUP_log("Pinging services (new post: “".$post_title."”) ..."); else SUP_log("Pinging services (new post) ..."); SUP_ping_services(); # Try commenting the line above, and uncommenting this line below # if pinging seems to be out of order. Please notify the author if it helps! # generic_ping(); } else { if($post_title) SUP_log("NOT pinging services (“".$post_title."” was edited)"); else SUP_log("NOT pinging services (a post was edited)"); } } else SUP_log("NOT pinging services (disabled by administrator)"); } # More or less a copy of WP's "generic_ping" from functions.php, # but uses another function to send the actual XML-RPC messages. function SUP_ping_services() { $services = get_settings('ping_sites'); $services = preg_replace("|(\s)+|", '$1', $services); // Kill dupe lines $services = trim($services); if ( '' != $services ) { $services = explode("\n", $services); foreach ($services as $service) SUP_send_xmlrpc($service); } } # A slightly modified version of the WordPress built-in ping functionality ("weblog_ping" in functions.php). # This one uses correct extendedPing format (WP does not), and logs response from service. function SUP_send_xmlrpc($server = '', $path = '') { global $wp_version; include_once (ABSPATH . WPINC . '/class-IXR.php'); // using a timeout of 3 seconds should be enough to cover slow servers $client = new IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path)); $client->timeout = 3; $client->useragent .= ' -- WordPress/'.$wp_version; // when set to true, this outputs debug messages by itself $client->debug = false; $home = trailingslashit( get_option('home') ); # the extendedPing format should be "blog name", "blog url", "check url" (whatever that is), and "feed url", # but it would seem as if the standard has been mixed up. it's therefore best to repeat the feed url. if($client->query('weblogUpdates.extendedPing', get_settings('blogname'), $home, get_bloginfo('rss2_url'), get_bloginfo('rss2_url'))) { SUP_log("- ".$server." was successfully pinged (extended format)"); } else { # pinging was unsuccessful, trying regular ping format if($client->query('weblogUpdates.ping', get_settings('blogname'), $home)) { SUP_log("- ".$server." was successfully pinged"); } else { SUP_log("- ".$server." could not be pinged. Error message: “".$client->error->message."”"); } } } $post_title = ""; # Receives the title of the post from a filter below function SUP_post_title($title) { global $post_title; $post_title = $title; return $title; } # ----- # Log stuff $logfile = ABSPATH."wp-content/smart-update-pinger.log"; # for debugging function SUP_log($line) { global $logfile; $fh = @fopen($logfile, "a"); @fwrite($fh, strftime("%D %T")."\t$line\n"); @fclose($fh); } function SUP_get_last_log_entries($num) { global $logfile; $lines = @file($logfile); if($lines === false) return "Error reading log file (".$logfile."). This could mean that the wp-content directory is write-protected and no log data can be saved, that you have manually removed the log file, or that you have recently upgraded the plugin."; else { $lines = array_slice($lines, count($lines) - $num); $msg = ""; foreach($lines as $line) $msg .= trim($line)."
"; return $msg; } } # ----- # adds a filter to receive the title of the post before publishing add_filter("title_save_pre", "SUP_post_title"); # adds some hooks # shows the options in the administration panel add_action("admin_menu", "SUP_add_options_page"); # calls SUP_ping whenever a post is published add_action("publish_post", "SUP_ping_if_new"); # calls SUP_ping_draft when changing the status from private/draft to published # add_action("private_to_published', 'SUP_ping_draft'); # removes the "WordPress official" pinging hook remove_action("publish_post", "generic_ping"); # activates pinging if setting doesn't exist in database yet # (before the user has changed the settings the first time) if(get_option("SUP_ping") === false) { update_option("SUP_ping", 1); } ?> Howto Monster

How to login to Myspace using cURL and PHP

June 12th, 2009

Howdy folks,

I had to figure out how to login to Myspace using curl and PHP for a project. So I thought I would post some code here for anyone looking to do something similar.

$cookieFile = ‘/tmp/mscookiejar-’.time().$randnum = mt_rand(11111, 999999);
$msUsername = ‘MYSPACEUSERNAME’;
$msPassword = ‘MYSPACEPASSWORD’;


//
// Log user into myspace
//
$curl_connection = curl_init(’https://secure.myspace.com/index.cfm?fuseaction=login.process’);
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT, “Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1″);
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl_connection, CURLOPT_COOKIEJAR, $cookieFile);
curl_setopt($curl_connection, CURLOPT_COOKIEFILE, $cookieFile);
//curl_setopt($curl_connection, CURLOPT_VERBOSE, true);
curl_setopt($curl_connection, CURLOPT_POST, true);
curl_setopt($curl_connection, CURLOPT_REFERER, “http://www.myspace.com”);
curl_setopt($curl_connection, CURLOPT_HTTPHEADER, Array(”Content-Type: application/x-www-form-urlencoded”));


$post_string = urlencode(’ctl00$ctl00$cpMain$cpMain$LoginBox$SingleSignOnHash’).’=';
$post_string .= ‘&’.urlencode(’ctl00$ctl00$cpMain$cpMain$LoginBox$SingleSignOnRequestUri’).’=';
$post_string .= ‘&’.urlencode(’ctl00$ctl00$cpMain$cpMain$LoginBox$nexturl’).’=';
$post_string .= ‘&’.urlencode(’ctl00$ctl00$cpMain$cpMain$LoginBox$apikey’).’=';
$post_string .= ‘&’.urlencode(’ctl00$ctl00$cpMain$cpMain$LoginBox$ContainerPage’).’=';
$post_string .= ‘&’.urlencode(’ctl00$ctl00$cpMain$cpMain$LoginBox$SMSVerifiedCookieToken’).’=';
$post_string .= ‘&’.urlencode(’ctl00$ctl00$cpMain$cpMain$LoginBox$Remember_Checkbox’).’=off’;
$post_string .= ‘&__VIEWSTATE=/wEPDwULLTIwOTI5NDgxMzlkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBTRjdGwwMCRjdGwwMCRjcE1haW4kY3BNYWluJExvZ2luQm94JFJlbWVtYmVyX0NoZWNrYm94′;
$post_string .= ‘&NextPage=’;
$post_string .= ‘&’.urlencode(’ctl00$ctl00$cpMain$cpMain$LoginBox$Email_Textbox’).’=’.urlencode($msUsername);
$post_string .= ‘&’.urlencode(’ctl00$ctl00$cpMain$cpMain$LoginBox$Password_Textbox’).’=’.urlencode($msPassword);


curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
$result = curl_exec($curl_connection);
curl_close($curl_connection);


// Find user id and name
$msIDStart = strpos($result, ‘{”UserId”:’) + 10;
$msIDEnd = strpos($result, ‘,”DisplayFriendId”:’) - $msIDStart;
$msID = substr($result, $msIDStart, $msIDEnd);


$msNameStart = strpos($result, ‘var uName = “‘) + 13;
$msNameEnd = strpos($result, ‘if(uName.length>20){’) - 13 - $msNameStart;
$msName = substr($result, $msNameStart, $msNameEnd);

курсовая работа рфэи
муниципальное управление курсовая
вяленая рыба курсовая
курсовая бухгалтерская отчетность организации руководство по ремонту хендай портер
курсовая оплата труда работников
фирменный стиль предприятия курсовая руководство по эксплуатации зил 433362
приватизация и разгосударствление курсовая стиль руководства и психологический климат
жидкие лекарственные формы курсовая работа 1с 8.2 руководство разработчика скачать
принятие управленческих решений курсовая работа
государственная служба в рф курсовая руководство по эксплуатации passat
чувства и эмоции курсовая rav4 2006 руководство по эксплуатации руководство starline c9
вышивка курсовая работа руководство по эксплуатации фольксваген шаран
курсовая внимание
курсовая работа по экономической статистике руководство пользователя виндовс 7 полное руководство по таро
курсовой проект ленточный конвейер
курсовая работа риски валютные операции
анализ использования ресурсов предприятия курсовая маз 64229 руководство по эксплуатации
курсовая психологические особенности подростков
курсовой проэкт руководство по эксплуатации двигателя
курсовая трудовое право трудовой договор руководство toyota probox
курсовая работа наружная реклама
анализ объема продаж курсовая руководство по ремонту скачать volkswagen
курсовая работа бюджетирование volkswagen touareg руководство по эксплуатации
земельные отношения в россии курсовая мазда бонго руководство по ремонту руководство пользователя образец
основания и фундаменты курсовой проект mandriva linux 2010 руководство пользователя
курсовые по бухгалтерскому делу руководство по ремонту volvo 460 руководство по эксплуатации canon 500d
оценка стоимости предприятия курсовая работа руководство по эксплуатации митсубиси аутлендер руководство по эксплуатации kia carnival
курсовая работа инфляция в россии руководство по ремонту honda civic
технико экономическая характеристика предприятия курсовая руководство по эксплуатации audi a4 руководство по эксплуатации ланос скачать
повышение конкурентоспособности предприятия курсовая canon mf4320d руководство по эксплуатации руководство по эксплуатации лиаз
хищение курсовая работа
финансы и кредит темы курсовых под руководством
курсовая рынок драгоценных металлов диетология полное руководство скачать
электронные деньги курсовая работа руководство по excel 2007 скачать
ценообразование в строительстве курсовая
курсовая магазин автозапчастей руководство по эксплуатации мицубиси кольт
анализ капитала курсовая автократичный стиль руководства руководство по анальному
курсовая работа нелинейное программирование excel 2003 руководство руководство по эксплуатации golf 3
учет выпуска готовой продукции курсовая руководство 2121
правоохранительная деятельность курсовая руководство пользователя kp 500
курсовая работа пробелы в праве
курсовая политика банка россии руководство по ремонту lexus руководство по эксплуатации passat b4
готовые курсовые по архитектуре руководство по эксплуатации honda crv руководство сотрудниками
статистика образования курсовая
стратегический анализ организации курсовая
курсовая фирменный стиль
убийство в состоянии аффекта курсовая ява 638 руководство по ремонту
прямое налогообложение курсовая руководство пользователя ps3
виды гражданских правоотношений курсовая работа руководство по эксплуатации дэу нексия руководство по ремонту lanos
микроконтроллеры курсовой проект
курсовая расторжение брака mark 2 руководство по эксплуатации
американская модель менеджмента курсовая работа
как писать план курсовой руководство по настройке windows 7 руководство по эксплуатации д 144
оценка ликвидационной стоимости предприятия курсовая руководство ford mondeo руководство исо мэк 49
основные фонды предприятия курсовая работа 2101 руководство vw passat руководство
курсовые по механизации животноводства
курсовая организация занятия проституцией руководство газпром нефть скачать руководство по рено премиум
курсовая экономика японии руководство по эксплуатации ваз 2110 сузуки свифт руководство
курсовая работа пенсия по инвалидности руководство матиз
лист с рамкой для курсовой
курсовая на тему гражданское общество ваз 2107 инжектор руководство focus руководство по эксплуатации
заказать курсовую недорого руководство по эксплуатации mercedes w210
курсовая работа система национальных счетов
отрицательная курсовая разница проводки руководство по ремонту тракторов
основы коммерческой деятельности курсовая
курсовая стратегия и тактика менеджмента руководство хундай акцент руководство по эксплуатации сигнализации
темы курсовых по административному праву dsl 2500u руководство пользователя руководство по ремонту тойота селика
курсовая финансы граждан руководство по ремонту деу матиз
особенности менеджмента организации курсовая руководство пользователя d link
учет валютных операций курсовая
бары курсовая работа руководство по эксплуатации газового котла
курсовая работа долгосрочные финансовые вложения скачать руководство по ремонту chevrolet руководство по ремонту газ 2217
титульный лист курсовой росноу nissan bluebird руководство краткое руководство к красноречию
разработка стратегической карты курсовая fly e160 руководство пользователя руководство газпрома
внешняя политика ивана грозного курсовая организация технического руководства
курсовая работа руководитель коллектива
первичный рынок ценных бумаг курсовая acer n300 руководство пользователя руководство шевроле ланос
полномочия суда кассационной инстанции курсовая руководство по эксплуатации htc
скачать курсовую акционерное общество
расходы торговой организации курсовая руководство по скорой помощи
государство и гражданское общество курсовая руководство пользователя dune hd max
курсовой проект теплогазоснабжение и вентиляция руководство по эксплуатации ipad
курсовая работа на тему планирование руководство по эксплуатации htc wildfire
разработка сфокусированной стратегии дифференциации курсовая руководство по ремонту опель омега
курсовая работа финансовая аренда лизинг руководство по ремонту toyota gaia
сегментация рынка курсовая работа руководство по эксплуатации автомобиля subaru опель омега руководство
курсовая работа управление предприятием руководство по эксплуатации kawasaki
пенсионный фонд курсовая
курсовые по информатике скачать
современные системы программирования курсовая
модульное обучение курсовая
деловое общение в организации курсовая
организация производства общественного питания курсовая кашкай руководство руководство nikon l110
как оформить курсовой проект руководство по ремонту дизельных двигателей
методы бухгалтерского учета курсовая
накладные расходы курсовая руководство по эксплуатации chery amulet стили руководства менеджера
анализ эффективности финансовых вложений курсовая asx руководство по эксплуатации дизельные двигатели руководство по обслуживанию
курсовая по технической термодинамике
английский сленг курсовая land cruiser prado 120 руководство
курсовая работа по тгп ms project 2010 руководство


How to run SMTP on a different or additional port in Linux with Plesk

August 16th, 2007

I apologize, but this post has been taken down.


How to restrict access to a web site folder

August 12th, 2007

Have you ever wanted to control access to a directory or file on your website?
Well, it’s actually quite simple to do this using an “.htaccess” file placed in that very directory of your website.
Currently this only works for Unix/Linux/Apache based hosts.
If you’re hosting your site with a a hosting company and you have a control panel to manage your site, you most likely have a more automated method for doing this. This article will explain how to do it manually, mainly for people with ‘root’ access to the server.

htaccess login prompt

So what is this .htaccess file?
A description of an .htaccess file as stated on the Apache website is

.htaccess files (or “distributed configuration files”) provide a way to make configuration changes on a per-directory basis.

Basically it allows you to make configuration changes to the functionality of the web server, but on a per directory basis.

OK, lets do this already.
First, login via SSH to the server hosting your website.
Change to the directory that you would like to restrict access to, or create it if it does not already exist.
Read the rest of this entry »


How to sync data between 2 servers automatically

August 8th, 2007

Have you ever wanted to know how to easily synchronize the data between multiple servers automatically?
In this article I’ll explain how to setup 2 Linux servers to automatically synchronize data between a specific directory on each server. To do this we will use rsync, ssh key authentication, and a cron job.

Let’s call the 2 servers ‘SOURCESERVER’ and ‘DESTSERVER’ for
SOURCESERVER = Source server (the server we’re connecting from to upload the data)
DESTSERVER = Destination server (the server we’re connecting to receive the data)


Part 1 - Setting up SSH key authentication

First, we need to make sure the DESTSERVER has the ability to use key authentication enabled. Find your sshd configuration file (usually ‘/etc/ssh/sshd_config’) and enable the following options if they are not already set.

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
Read the rest of this entry »


Your top ten linux commands ?

August 7th, 2007

So I thought it would be fun to start a top ten list of everyone’s most commonly used Linux commands.

On your Linux box run the following command.

# history |tr '\011' ' ' |tr -s " "| cut -d' ' -f3 |sort |uniq -c |sort -nbr |head -n10

Hopefully that gives you a similar output, if so it should give you a list of the top ten most commonly used commands in your command history sorted by the most common first. The number just before the command is the number of times it has been run.

Here’s my top ten.

——————————–
200 clear
193 ls
142 vi
48 cd
45 less
45 history
41 yum
41 tail
19 cp
18 ./configure
——————————–

Post your top ten commands in the comments.


How to setup a Linux FTP server

August 6th, 2007

This article should help you install and configure the Proftpd software on a Fedora Linux server using RPM packages for the install.

Assuming you’re using RedHat, Fedora, or CentOS, you should already have a tool called ‘yum’ installed on the server. Yum is an acronym for ‘Yellowdog Updater, Modified’ and is a very useful tool for installing and updating RPM packages on your Linux server. It will usually take care of all needed dependencies for a package(s) , sometimes saving you hours of time that it would normally take to manually download and install each piece of software.

To install proftpd use the following command Read the rest of this entry »


How to setup Apache2 web server to host multiple sites on 1 IP address

August 6th, 2007

It’s very common these days to host multiple websites on a server using only a single IP address.
This is done with the Apache web server using ‘Virtual Hosts’.

You must first make sure that you have configured DNS to point whatever domains you wish to host on the server to the server’s IP address.

In your httpd.conf file (or a separate file that is included from the httpd.conf file) you will need lines similar to the following. Read the rest of this entry »


How to display web servers IP address (and other info) in a web page

August 5th, 2007

This simple article will explain how you can display some commonly used information directly into a web page using the very popular PHP programming language.In order to run PHP scripts on your web site you must have the appropriate software installed and configured. Most hosting accounts will already have this available.
If the below examples do not work then you will need to install PHP support on your server or ask your hosting provider to do so.

When a web server serves data to a client there is a multitude of information available both about the server itself as well as the current client accessing the server.
This information is stored in PHP’s predefined variables. Read the rest of this entry »


Cheap web hosting options (top 10)

August 5th, 2007

Cheap web hosting options (top 10)

With the countless number of available hosting companies out there and the varied packages each company offers it can become quite difficult to keep your brain from twisting into a pretzel when comparing all the options and making a decision on who you will go with for hosting your website.

Here is a top ten list compiled by user reviews with my friends at that should help you narrow down your options.

Rank Hosting Company Price/mo Disk Space Bandwidth
1 $4.95 300GB 3000GB
2 $5. Find images of pills & save up to 75% now. Cozaar is used in the treatment of high blood pressure. Buy Cozaar Compare Cozaar prices from every licensed pharmacy & save 20 to 85%. Find images of pills & save up to 75% now. 77 300GB 3000GB
3 $5.95 300GB 3000GB
4 $6.95 300GB 3000GB
5 $ heart, pink, imprinted with B I, L LZebeta helps control high blood pressure and may also be used to improve What Is Zebeta Used for. Buy zebeta Online. Buy Zebeta Beta-blockers lower bloodFind medical information for Zebeta Oral including side effects, drug interactions, images and pictures, medication uses, warnings, user ratings andJul 13, 2005 Zebeta patient information. Compare Zebeta prices from every licensed pharmacy & save 20 to 85%. 5.95 300GB 3000GB
6 $7.95 300GB 3000GB
7 $7.95 200GB 3000GB
8 $6.95 350GB 3500GB
9 $6.95 250GB 2500GB
10 $7.96 100GB 1000GB

Web Server Basics

August 5th, 2007

This article should help explain the basics of a web server as well as the most common types of web hosting available today.

What is a web server?
A web server is a computer, including software packages, that provides a specific kind of service to
client software running on other computers. More specifically, a server is a computer that manages
and shares web based applications and data accessible anytime from any computer connected to the
internet.

What are my options for hosting a web site?
When deciding how to host your website you generally have a few options. Read the rest of this entry »



Copyright 2007 HowtoMonster.com
Freelance Server Administration | The Musicians Network | www.techshoot.net | Social Network User Search