Changeset 5307
- Timestamp:
- 04/24/2007 11:58:51 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r5119 r5307 673 673 674 674 // original code by Mort (http://mort.mine.nu:8080) 675 $log = debug_fopen(ABSPATH . '/pingback.log', 'a');676 675 $post_links = array(); 677 debug_fwrite($log, 'BEGIN ' . date('YmdHis', time()) . "\n");678 676 679 677 $pung = get_pung($post_ID); … … 690 688 // http://www.phpfreaks.com/quickcode/Extract_All_URLs_on_a_Page/15.php 691 689 preg_match_all("{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp); 692 693 // Debug694 debug_fwrite($log, 'Post contents:');695 debug_fwrite($log, $content."\n");696 690 697 691 // Step 2. … … 718 712 719 713 foreach ( (array) $post_links as $pagelinkedto ) { 720 debug_fwrite($log, "Processing -- $pagelinkedto\n");721 714 $pingback_server_url = discover_pingback_server_uri($pagelinkedto, 2048); 722 715 … … 724 717 @ set_time_limit( 60 ); 725 718 // Now, the RPC call 726 debug_fwrite($log, "Page Linked To: $pagelinkedto \n");727 debug_fwrite($log, 'Page Linked From: ');728 719 $pagelinkedfrom = get_permalink($post_ID); 729 debug_fwrite($log, $pagelinkedfrom."\n");730 720 731 721 // using a timeout of 3 seconds should be enough to cover slow servers … … 739 729 if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto ) ) 740 730 add_ping( $post_ID, $pagelinkedto ); 741 else 742 debug_fwrite($log, "Error.\n Fault code: ".$client->getErrorCode()." : ".$client->getErrorMessage()."\n"); 743 } 744 } 745 746 debug_fwrite($log, "\nEND: ".time()."\n****************************\n"); 747 debug_fclose($log); 731 } 732 } 748 733 } 749 734 … … 781 766 $fs = @fsockopen($trackback_url['host'], $trackback_url['port'], $errno, $errstr, 4); 782 767 @fputs($fs, $http_request); 783 /*784 $debug_file = 'trackback.log';785 $fp = fopen($debug_file, 'a');786 fwrite($fp, "\n*****\nRequest:\n\n$http_request\n\nResponse:\n\n");787 while(!@feof($fs)) {788 fwrite($fp, @fgets($fs, 4096));789 }790 fwrite($fp, "\n\n");791 fclose($fp);792 */793 768 @fclose($fs); 794 769
Note: See TracChangeset
for help on using the changeset viewer.