Форум по Delphi программированию

Delphi Sources



Вернуться   Форум по Delphi программированию > Все о Delphi > Интернет и сети
Ник
Пароль
Регистрация <<         Правила форума         >> FAQ Пользователи Календарь Поиск Сообщения за сегодня Все разделы прочитаны

Ответ
 
Опции темы Поиск в этой теме Опции просмотра
  #1  
Старый 29.03.2012, 20:50
scroyler scroyler вне форума
Активный
 
Регистрация: 01.08.2011
Адрес: ЧЕбоксары
Сообщения: 248
Версия Delphi: XE
Репутация: -615
По умолчанию Отправка на фотохостинг

Помогите ,как правильно?

Код:
var params,responseres:tstringlist;
begin
params:=TStringList.Create;
responseres:=TStringList.Create;
try
params.Add('type=direct');
params.Add('userfile[]=D:\image.jpeg');
params.Add('private=0');
params.Add('x=43');
params.Add('y=11');
responseres.Text:=idhttp1.Post('http://www.afroimages.org/index.php',params);
if Pos('[img]',responseres.Text)>0 then
ShowMessage('Авторизовались!');
finally
params.free;
responseres.free;
end;
end;
__________________
Ставь спасибо за спасибо!
Помог?Ставь спасибо!Увидел пост? Поставь спасибо!
Ответить с цитированием
  #2  
Старый 30.03.2012, 08:57
Аватар для NumLock
NumLock NumLock вне форума
Let Me Show You
 
Регистрация: 30.04.2010
Адрес: Северодвинск
Сообщения: 5,426
Версия Delphi: 7, XE5
Репутация: 59586
Подмигивание

Код:
uses
  IdMultipartFormData,
...
var
  MultiPartFormDataStream: TIdMultiPartFormDataStream;
begin
  MultiPartFormDataStream:=TIdMultiPartFormDataStream.Create;
  try
    MultiPartFormDataStream.AddFile('userfile[]', 'd:\Downloads\Service.jpg', 'image/jpeg');
    MultiPartFormDataStream.AddFormField('type', 'direct');
    MultiPartFormDataStream.AddFormField('private', '0');
    Memo1.Text:=IdHTTP1.Post('http://www.afroimages.org/upload.php', MultiPartFormDataStream);
    Memo1.Lines.SaveToFile('d:\Downloads\Response.htm');
  finally
    MultiPartFormDataStream.Free;
  end;
end;
__________________
Пишу программы за еду.
__________________
Ответить с цитированием
  #3  
Старый 30.03.2012, 09:50
scroyler scroyler вне форума
Активный
 
Регистрация: 01.08.2011
Адрес: ЧЕбоксары
Сообщения: 248
Версия Delphi: XE
Репутация: -615
По умолчанию

Код:
	
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

  <head>

	
<TITLE>AfroImages.Org - Free Image Hosting For All… African American image hosting, black people free image hosting, picture hosting, afro American image hosting for myspace, black image hosting site,  free image hosting site, african American hosting image photo site, black folk image and video hosting, black men image and video hosting, black women image hosting web site, black family photobucket image hosting, african Americans free image hosting web site, black male free online image hosting, black people free image video hosting, african American online image hosting, african American man  free image hosting service, african American woman free hosting image web…</TITLE>

<META NAME="keywords" CONTENT="African American image hosting, black people free image hosting, afro American image hosting for myspace, black image hosting site,  free image hosting site, picture hosting, african American hosting image photo site, black folk image and video hosting, black men image and video hosting, black women image hosting web site, black family photobucket image hosting, african Americans free image hosting web site, black male free online image hosting, black people free image video hosting, african American online image hosting, african American man  free image hosting service, african American woman free hosting image web, African American image hosting, black people free image hosting, afro American image hosting for myspace, black image hosting site,  free image hosting site, african American hosting image photo site, black folk image and video hosting, black men image and video hosting, black women image hosting web site, black family photobucket image hosting, african Americans free image hosting web site, black male free online image hosting, black people free image video hosting, african American online image hosting, african American man  free image hosting service, african American woman free hosting image web, African American image hosting, black people free image hosting, afro American image hosting for myspace, black image hosting site,  free image hosting site, african American hosting image photo site, black folk image and video hosting, black men image and video hosting, black women image hosting web site, black family photobucket image hosting, african Americans free image hosting web site, black male free online image hosting, black people free image video hosting, african American online image hosting, african American man  free image hosting service, african American woman free hosting image web…">

<META NAME="Description" CONTENT="AfroImages.Org - Free Image Hosting For All… African American image hosting, black people free image hosting, afro American image hosting for myspace, black image hosting site,  free image hosting site, african American hosting image photo site, picture hosting, black folk image and video hosting, black men image and video hosting, black women image hosting web site, black family photobucket image hosting, african Americans free image hosting web site, black male free online image hosting, black people free image video hosting, african American online image hosting, african American man  free image hosting service, african American woman free hosting image web…">

    <meta name="robots" content="index,follow">

    
    <base href="http://www.afroimages.org/">

    <link rel="stylesheet" href="css/style.css" type="text/css">

    <link rel="shortcut icon" href="css/favicon.ico">

    <script type="text/javascript" src="http://www.google-analytics.com/urchin.js"></script>

    <script type="text/javascript" src="source/javascript.js"></script>

  </head>

  <body onload="javascript:urchinTracker();">

  <div class="page_cell">
     <a href=""><div class="logo"></div></a>
       <div class="nav">
	<ul>


         <li><a href="index.php">Home</a>

         <li><a href="info.php?act=about_us">About Us</a></li>

         <li><a href="gallery.php">Gallery</a></li>

         <li><a href="contact.php?act=file_report">Report File</a></li>

         <li><a href="index.php?do_random=true">Random Image</a></li>

         <li><a href='users.php?act=login'><u>Login</u></a></li>

         <li><a href='users.php?act=register'><u>Register</u></a></li>
	 <li><a href='users.php?act=lost_password'>Lost Password</a>
	 </ul>

        </div>
       <div class="fade">&nbsp;</div>

       <div class="page_body">

<div class='message'><strong class='warning_title'>General Error!</strong><br><br>The file 5.BMP</b> extension is not allowed.<br><br><a href='contact.php?act=contact_us'>Contact us for support</a></div>       </div>
      <div class="fade_rev">&nbsp;</div>
      <div class="footer">
	<!--
	All content of Mihalism Multi Host are protected by U.S. copyright, international treaties, 

	and other applicable copyright laws and you may not have any copyrights notices removed 

	without the express permission of Mihalism Inc, which reserves all rights. Use of 

	Mihalism Multi Host without a copyright and without Mihalism Inc permission is 

	strictly prohibited. 
	-->
        Copyright © 2008 - 2011 <a href="http://www.Nu45.com/"><b><u>Nu45, Inc...</u></b></a> 
	| <a href="info.php?act=privacy_policy">Privacy Policy</a> | <a
        href="contact.php?act=contact_us">Contact us</a> | <a href="info.php?act=rules">Rules</a>
	| <a href="http://validator.w3.org/check?uri=referer"><img src="css/vhtml4.gif"
        alt="Valid HTML" /></a> | <a
        href="http://jigsaw.w3.org/css-validator/check/referer"><img src="css/vcss.gif"
        alt="Valid CSS" /></a> | 
       </div>
     </div>
		 
		 <p>
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-2070044640573029";
/* AfroImages */
google_ad_slot = "2589680636";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>


  </body>
</html>
Вот что получаю в мемо, что это?
__________________
Ставь спасибо за спасибо!
Помог?Ставь спасибо!Увидел пост? Поставь спасибо!
Ответить с цитированием
  #4  
Старый 30.03.2012, 09:57
Аватар для NumLock
NumLock NumLock вне форума
Let Me Show You
 
Регистрация: 30.04.2010
Адрес: Северодвинск
Сообщения: 5,426
Версия Delphi: 7, XE5
Репутация: 59586
Радость

Цитата:
Сообщение от scroyler
что это?
это ответ сервера - html страничка, на которой написано:
Цитата:
General Error!
The file 5.BMP extension is not allowed.
подробнее надо?)
__________________
Пишу программы за еду.
__________________
Ответить с цитированием
  #5  
Старый 30.03.2012, 10:17
scroyler scroyler вне форума
Активный
 
Регистрация: 01.08.2011
Адрес: ЧЕбоксары
Сообщения: 248
Версия Delphi: XE
Репутация: -615
По умолчанию

ааа большое спасибо
__________________
Ставь спасибо за спасибо!
Помог?Ставь спасибо!Увидел пост? Поставь спасибо!
Ответить с цитированием
Ответ


Delphi Sources

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать темы
Вы не можете отвечать на сообщения
Вы не можете прикреплять файлы
Вы не можете редактировать сообщения

BB-коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход


Часовой пояс GMT +3, время: 11:49.


 

Сайт

Форум

FAQ

Соглашения

Прочее

 

Copyright © Форум "Delphi Sources" by BrokenByte Software, 2004-2025