note 105953 added to function.http-build-query
| From: | antishape at gmail dot com | Date: | Tue, 27 Sep 2011 12:33:14 +0000 |
| Subject: | note 105953 added to function.http-build-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-183478@lists.php.net to get a copy of this message | ||
Right now I have this code
<?php
function getWikiIntroParagraph( $title ) {
$url = 'http://de.wikipedia.org/w/index.php?' .
http_build_query(array( 'title' => $title, 'action' => 'raw' ));
// Download $url and do your magic extraction
return $intro;
}
$posttags = get_the_tags();
if ($posttags) {
echo '<ul>';
foreach($posttags as $tag) {
echo '<li><strong>' . htmlspecialchars( $tag->name ) .
'</strong>: ' . getWikiIntroParagraph( $tag->name );
}
echo '</ul>';
}
?>
But only returns list-elements (the tags in wordpress). I have no idea where the error could be
someone suggested the http_build_query could contain an error. It's not my code but it was an
example of how to get an extraction of a wikipedia article.
----
Server IP: 69.147.83.197
Probable Submitter: 85.22.20.4
----
Manual Page -- http://www.php.net/manual/en/function.http-build-query.php
Edit -- https://master.php.net/note/edit/105953
Del: integrated -- https://master.php.net/note/delete/105953/integrated
Del: useless -- https://master.php.net/note/delete/105953/useless
Del: bad code -- https://master.php.net/note/delete/105953/bad+code
Del: spam -- https://master.php.net/note/delete/105953/spam
Del: non-english -- https://master.php.net/note/delete/105953/non-english
Del: in docs -- https://master.php.net/note/delete/105953/in+docs
Del: other reasons-- https://master.php.net/note/delete/105953
Reject -- https://master.php.net/note/reject/105953
Search -- https://master.php.net/manage/user-notes.php