<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[URL prüfen]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie gehe ich denn am besten vor um zu prüfen ob eine URL noch funktioniert?<br />
Dabei möchte ich auch den Fehler rauskriegen, also 404, 403 usw...</p>
<p>Danke im voraus<br />
Johannes</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/116829/url-prüfen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Jul 2026 02:11:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/116829.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 31 Jul 2005 15:41:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to URL prüfen on Sun, 31 Jul 2005 15:41:40 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie gehe ich denn am besten vor um zu prüfen ob eine URL noch funktioniert?<br />
Dabei möchte ich auch den Fehler rauskriegen, also 404, 403 usw...</p>
<p>Danke im voraus<br />
Johannes</p>
]]></description><link>https://www.c-plusplus.net/forum/post/842787</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/842787</guid><dc:creator><![CDATA[Johannes84]]></dc:creator><pubDate>Sun, 31 Jul 2005 15:41:40 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Sun, 31 Jul 2005 15:47:14 GMT]]></title><description><![CDATA[<p>Einen HTTP Request absetzen</p>
<p>Dafür gibt es die Komponente TNMHTTP</p>
]]></description><link>https://www.c-plusplus.net/forum/post/842792</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/842792</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sun, 31 Jul 2005 15:47:14 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Sun, 31 Jul 2005 16:00:13 GMT]]></title><description><![CDATA[<p>danke schonmal...</p>
<p>Ich habe irgendwo gelesen, dass man lieber die Indy Komponenten als die FastNet Komponenten benutzen soll, da die sehr buggy sein sollen...</p>
<p>Bei den Indys muss ich dann schätze ich mal IdHTTP, aber wie genau gehe ich da vor, wenn ich da eine URL testen will. Hat da vielleicht jemand ein Snippet zur Hand...?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/842808</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/842808</guid><dc:creator><![CDATA[Johannes84]]></dc:creator><pubDate>Sun, 31 Jul 2005 16:00:13 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Sun, 31 Jul 2005 16:05:51 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Ja, du kannst auch die Indy-Komponente nehmen.<br />
Was du auch nimmst, schau dir doch erstmal die Dokus und die Beispiele an, die es zu beiden gibt.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/842811</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/842811</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sun, 31 Jul 2005 16:05:51 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Sun, 31 Jul 2005 16:46:39 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">HTTP-&gt;Get(deine_URL);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/842843</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/842843</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sun, 31 Jul 2005 16:46:39 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Sun, 31 Jul 2005 23:21:40 GMT]]></title><description><![CDATA[<p>danke...</p>
<p>also, ich versuche jetzt Adressen in Memo1 zu prüfen und in Memo2 soll der entsprechende ResponseCode ausgegeben werden...also 200, 404, 403 usw...<br />
aber irgendwie klappts das so noch nicht, in BCB wird jedesmal eine Exception ausgelöst, trotz try catch....immer ein Fehler des Typs EIdProtocolReplyError</p>
<pre><code class="language-cpp">for(i=0;i&lt;lcount;i++)
        {
        if(IdHTTP1-&gt;Connected()) IdHTTP1-&gt;Disconnect();
        try
                {
                IdHTTP1-&gt;Get(Memo1-&gt;Lines-&gt;Strings[i]);
                Memo2-&gt;Lines-&gt;Strings[i]=IdHTTP1-&gt;ResponseCode;
                }
        catch(EIdProtocolReplyError &amp;e)
                {
                Memo2-&gt;Lines-&gt;Strings[i]=IdHTTP1-&gt;ResponseCode;
                }
        }
</code></pre>
<p>kann mir da jemand helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843075</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843075</guid><dc:creator><![CDATA[Johannes84]]></dc:creator><pubDate>Sun, 31 Jul 2005 23:21:40 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 04:35:13 GMT]]></title><description><![CDATA[<p>Vielleicht doch mal die von mir empfohlene Komponente benutzen?</p>
<p>Läuft ohne Fehler</p>
<p><a href="http://www.marquardtnet.info/cecke/programme.4/alive.42/42_alive.html" rel="nofollow">http://www.marquardtnet.info/cecke/programme.4/alive.42/42_alive.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/843101</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843101</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Mon, 01 Aug 2005 04:35:13 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 05:11:49 GMT]]></title><description><![CDATA[<p>Wie sieht der 'Eintrag in TMemo aus für eine URL?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843107</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843107</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Mon, 01 Aug 2005 05:11:49 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 05:43:02 GMT]]></title><description><![CDATA[<p>solange du dein programm aus der ide heraus startest, bekommst du immer alle exceptions angezeigt, nur wenn du es normal startest, werden die exceptions in einem try/catch-block abgefangen ohne unterbrechung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843109</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843109</guid><dc:creator><![CDATA[Sunday]]></dc:creator><pubDate>Mon, 01 Aug 2005 05:43:02 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 13:24:33 GMT]]></title><description><![CDATA[<p>ja, das stimmt, wenn ich das Programm so starte kommen diese Exceptions nicht, aber ein Socket Fehler 11004 kommt...weiß jemand warum?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843520</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843520</guid><dc:creator><![CDATA[Johannes84]]></dc:creator><pubDate>Mon, 01 Aug 2005 13:24:33 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 13:30:39 GMT]]></title><description><![CDATA[<p>und einen Fehler &quot;302 Found&quot; bekomme ich auch, aber warum ist das überhaupt ein Fehler...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843526</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843526</guid><dc:creator><![CDATA[Johannes84]]></dc:creator><pubDate>Mon, 01 Aug 2005 13:30:39 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 14:20:23 GMT]]></title><description><![CDATA[<p>Wer sagt, dass 302 ein Fehler ist?? Fehler sind ab 500. Ein 11004 Error bedeutet, dass der Domain Name nicht in eine IP Adresse aufgelöst werden konnte (Grund: es wurde kein DNS Eintrag gefunden)</p>
<p>Statuscode Beschreibung<br />
100 Continue<br />
101 Switching Protocols<br />
200 O.K.<br />
201 Created<br />
202 Accepted<br />
203 Non-Authoritative Information<br />
204 No Content<br />
205 Reset Content<br />
206 Partial Content<br />
300 Multiple Choices<br />
301 Moved Permanently<br />
302 Moved Temporarily<br />
303 See Other<br />
304 Not Modified<br />
305 Use Proxy<br />
306 Reserviert<br />
307 Temporary Redirect<br />
400 Bad Request<br />
401 Unauthorized<br />
402 Payment Requiered<br />
403 Forbidden<br />
404 Not Found<br />
405 Method not allowed<br />
406 Not Acceptable<br />
407 Proxy Authentication Required<br />
408 Request Timeout<br />
409 Conflict<br />
410 Gone<br />
411 Length Requiered<br />
412 Precondition Failed<br />
413 Request Entity Too Large<br />
414 Request-URI-Too Large<br />
415 Unsupported Media Type<br />
416 Requested Range Not Satisfiable<br />
417 Exception Failed<br />
500 Internal Server Error<br />
501 Not Implemented<br />
503 Service Unavailable<br />
504 Gateway Timeout<br />
505 HTTP Version Not Supported</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843586</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843586</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Mon, 01 Aug 2005 14:20:23 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 14:26:06 GMT]]></title><description><![CDATA[<p>naja, bei 302 tritt catch in kraft...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843597</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843597</guid><dc:creator><![CDATA[Johannes84]]></dc:creator><pubDate>Mon, 01 Aug 2005 14:26:06 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 14:35:48 GMT]]></title><description><![CDATA[<p>hmmm, warum funktioniert meine schleife so nicht:</p>
<pre><code class="language-cpp">for(i=0;i&lt;20;i++)
        {
        Memo1-&gt;Lines-&gt;Strings[i]=&quot;zeile&quot;;
        }
</code></pre>
<p>dabei werden nur 2 anstatt 20 zeilen geschrieben, aber woran hängts?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843615</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843615</guid><dc:creator><![CDATA[Johannes84]]></dc:creator><pubDate>Mon, 01 Aug 2005 14:35:48 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 14:40:04 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>- was hast das noch mit diesem Thread zu tun?<br />
- wiviele Zeilen sind denn vorher in dem Memo? Wenn du einfach 20 neue Zeilen willst, must du <em>-&gt;Lines-&gt;Add(&quot;Zeile&quot;)</em> machen</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843619</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 01 Aug 2005 14:40:04 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 14:50:06 GMT]]></title><description><![CDATA[<p>sorry...hat nur indirekt damit zu tun...<br />
aber wenn ich etwas in eine bestimmte zeile einfügen will ohne es einfach anzuhängen, wie geht das dann?<br />
ich dachte mit Memo1-&gt;Lines-&gt;Strings[x]=&quot;zeile x&quot;; geht das....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843629</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843629</guid><dc:creator><![CDATA[Johannes84]]></dc:creator><pubDate>Mon, 01 Aug 2005 14:50:06 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 14:52:26 GMT]]></title><description><![CDATA[<p>Wenn man auf <strong>DIE SCHON VORHANDENEN ZEILEN</strong> zugreifen will sollte das immer über i&lt;Memo1-&gt;Lines-&gt;Count erfolgen.</p>
<p>Zu 302:</p>
<p>Dann solltest du im Catchzweig auf die Nummer prüfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843630</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843630</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Mon, 01 Aug 2005 14:52:26 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 14:53:57 GMT]]></title><description><![CDATA[<p>Hallo</p>
<pre><code class="language-cpp">Memo1-&gt;Lines-&gt;Strings[x]=&quot;zeile x&quot;;
</code></pre>
<p>ersetzt die i-te Zeile im Memo durch &quot;zeile x&quot;. Ist die Zeile nicht vorhanden, kommt eine Zugriffsverletzung.</p>
<pre><code class="language-cpp">Memo1-&gt;Lines-&gt;Strings[x]=Memo1-&gt;Lines-&gt;Strings[x]+&quot;zeile x&quot;;
</code></pre>
<p>fügt &quot;zeile x&quot; an die i-te Zeile an. Zugriffsverletzung...</p>
<p>Dann gibt es noch <em>Lines-&gt;Insert()</em> und <em>Lines-&gt;Add()</em>.</p>
<p>Was willst du also?</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843633</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843633</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 01 Aug 2005 14:53:57 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 15:53:05 GMT]]></title><description><![CDATA[<p>danke nochmals...<br />
also, so sieht die Stelle aus:</p>
<pre><code class="language-cpp">for(i=0;i&lt;lcount;i++)
        {
        if(IdHTTP1-&gt;Connected()) IdHTTP1-&gt;Disconnect();
        try
                {
                IdHTTP1-&gt;Get(Memo1-&gt;Lines-&gt;Strings[i]);
                Memo2-&gt;Lines-&gt;Strings[i]=IdHTTP1-&gt;ResponseCode;
                ShowMessage(IdHTTP1-&gt;ResponseCode);
                }
        catch(EIdProtocolReplyError &amp;e)
                {
                Memo2-&gt;Lines-&gt;Strings[i]=IdHTTP1-&gt;ResponseCode;
                }
        }
}
</code></pre>
<p>Memo2 ist 20 Zeilen groß, im try Block wird bei der ersten Ausführung alles gemacht, ab der zweiten Ausführung (für i=1) wird Memo2-&gt;Lines-&gt;Strings...nicht mehr ausgeführt, bzw es erscheint nichts in dieser Zeile, ShowMessage wird aber korrekt ausgeführt...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843679</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843679</guid><dc:creator><![CDATA[Johannes84]]></dc:creator><pubDate>Mon, 01 Aug 2005 15:53:05 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 16:22:56 GMT]]></title><description><![CDATA[<p>Warum ist Memo2 20 Zeilen groß???</p>
<p>Da du ja immer in das Memo2 schreibst sollte folgendes funktionieren:</p>
<pre><code class="language-cpp">for(i=0;i&lt;lcount;i++)
        {
        if(IdHTTP1-&gt;Connected()) IdHTTP1-&gt;Disconnect();
        try
                {
                IdHTTP1-&gt;Get(Memo1-&gt;Lines-&gt;Strings[i]);
                Memo2-&gt;Lines-&gt;Add(IdHTTP1-&gt;ResponseCode);
                ShowMessage(IdHTTP1-&gt;ResponseCode);
                }
        catch(EIdProtocolReplyError &amp;e)
                {
                Memo2-&gt;Lines-&gt;Add(IdHTTP1-&gt;ResponseCode);
                }
        }
}
</code></pre>
<p>Des Weiteren ist m.E. das</p>
<pre><code class="language-cpp">if(IdHTTP1-&gt;Connected()) IdHTTP1-&gt;Disconnect();
</code></pre>
<p>verbinden falsch. Damit wird eine Verbindung zu einem Server hergestellt. Das hat die Klasse geerbt, aber das willst du ja so direkt nicht (jedenfalls keine &quot;Dauerverbindung&quot;). Die Klasse sollte intern bei einem Get selbst die Verbindung herstellen und wieder beenden. Das sollte nur mit dem Get funktionieren. Das funktioniert jedenfalls bei TNMHTTP so. Hier könnte es analog so sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843698</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843698</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Mon, 01 Aug 2005 16:22:56 GMT</pubDate></item><item><title><![CDATA[Reply to URL prüfen on Mon, 01 Aug 2005 16:30:39 GMT]]></title><description><![CDATA[<p>Auc ist etwas an der Logik nicht so ganz ok</p>
<p>Beim ersten Lauf wird geprüft, ob HTTP-Connect ist.Wenn ja wird die Connection beendet.</p>
<p>Dann wird der Response abgesetzt.</p>
<p>Auf eine nicht bestehende Verbindung??<br />
Wozu dann die Prüfung bei jedem Durchlauf?<br />
Wann wird die Verbindung erstellt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/843702</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/843702</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Mon, 01 Aug 2005 16:30:39 GMT</pubDate></item></channel></rss>