[pLog-svn] r1850 - plog/trunk/tools
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Sun Apr 17 17:30:47 GMT 2005
Author: oscar
Date: 2005-04-17 17:30:47 +0000 (Sun, 17 Apr 2005)
New Revision: 1850
Added:
plog/trunk/tools/tbgen.php
Log:
Added: plog/trunk/tools/tbgen.php
===================================================================
--- plog/trunk/tools/tbgen.php 2005-04-17 16:40:11 UTC (rev 1849)
+++ plog/trunk/tools/tbgen.php 2005-04-17 17:30:47 UTC (rev 1850)
@@ -0,0 +1,66 @@
+<?php
+
+if (!defined( "PLOG_CLASS_PATH" )) {
+ define( "PLOG_CLASS_PATH", dirname(__FILE__)."/../");
+}
+
+include_once( PLOG_CLASS_PATH."class/net/http/httpclient.class.php" );
+
+if( isset( $_POST["sendTb"] )) {
+ // get the information from the request and send the trackback
+ $tbUrl = $_POST["tbUrl"];
+ $tbBlogName = $_POST["tbBlogName"];
+ $tbBlogUrl = $_POST["tbTitle"];
+ $tbText = $_POST["tbText"];
+ $tbTitle = $_POST["tbTitle"];
+
+ // build the call
+ $c = new HttpClient();
+ $formVars["title"] = $tbTitle;
+ $formVars["excerpt"] = $tbText;
+ $formVars["url"] = $tbBlogUrl;
+ $formVars["blog_name"] = $tbBlogName;
+ $tbSent = $c->submit( $tbUrl, $formVars );
+ $formSubmit = true;
+}
+else {
+ $tbUrl = "";
+ $tbBlogName = "";
+ $tbBlogUrl = "";
+ $tbTitle = "";
+ $tbText = "";
+ $tbSent = false;
+ $formSubmit = false;
+}
+?>
+
+<html>
+ <head>
+ <title>Trackback generator</title>
+ </head>
+ <body>
+ <?php if( $formSubmit) { if( $tbSent ) { ?>
+ <b>Trackback sent!</b><br/><br/>
+ <?php } else { ?>
+ <b>There was an error sending the trackback!</b><br/><br/>
+ <?php }} ?>
+ <form name="tbData" method="post">
+ Trackback URL:
+ <input type="text" name="tbUrl" value="<?php echo $tbUrl ?>" />
+ <br/>
+ Blog Name:
+ <input type="text" name="tbBlogName" value="<?php echo $tbBlogName ?>" />
+ <br/>
+ Blog URL:
+ <input type="text" name="tbBlogUrl" value="<?php echo $tbBlogUrl ?>" />
+ <br/>
+ Title:
+ <input type="text" name="tbTitle" value="<?php echo $tbTitle ?>" />
+ <br/>
+ Excerpt:
+ <textarea name="tbText"><?php echo $tbText; ?></textarea>
+ <br/>
+ <input type="submit" name="sendTb" value="Send Trackback!" />
+ </form>
+ </body>
+</html>
\ No newline at end of file
More information about the pLog-svn
mailing list