الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

الاتصال عبر بروكسي

مغلق
بدأه رامي العيساوي في 7 أغسطس 2003 · 18 رد · 1,733 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

كيف يتم اتصال برنامج جافا (تطبيق) بالمخدمات الموجودة على الانترنت و لكن عبر مخدم بروكسي

وشكرا

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#2

ماذا بكم الا يوجد احد يستخدم الانترنت في برامجه و معظمنا يتصل من وراء بروكسي الا يوجد احد لديه افكار يساعدنا بها:confused:

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#3

ياخي لا اعتقد انك تحتاج الى كود للبروكسي !

مادام انك متصل بالانترنت (يعني الاتصال تم انشاءه عن طريق نظام التشغيل لديك)

خلاص ما يحتاج برنامجك انه يعرف البروكسي !

الا اذا كنت تريد ان تجعل برنامجك هو الذي ينشئ الاتصال

فهذا شئ اخر ...

وارجو ان تضع المشكلة اللي واجهتك

الكود اللي جربته ولم يعمل مثلا مع الاخطاء اللي ظهرت لك ..

#4

اخي الاتصال انشئ و لكن الخطا التالي يظهر لي في البرنامج :

Unable to connect to any hosts due to exception: java.net.SocketException: Network is unreachable: connect

و سوف اضع البرنامج في الارشيف ليستفيد منه الجميع و لكن بعد ان يعمل بشكل صحيح

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#5

اذكر انه هناك طريقة و هي ضرورية ليتمكن البرنامج من التعرف على البروكسي و الاتصال عن طريقه؟؟؟

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#6

طبعا انا احاول الاتصال بـ مخدم قواعد بيانات Mysql و هو freesql.org

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#7

يا شباب يا عالم يا اخوان

ماذا بكم:confused: هذه مسالة من الضروري حلها؟؟ اليس كذلك

هل من المعقول ان لا يوجد احد يستخدم الانترنت في برامجه و معظمنا يتصل من وراء بروكسي فكيف الطريقة؟؟

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#9

طيب ليش ما تعرض مشكلتك في منتدى الجافا (الصن) الرسمي أكيد راح يعطونك الحل :)

#10

تقوم هذه الطريقة بالاتصال بالانترنت و من ثم قراءة الصفحة التي عنوانها هو الـ url المدخل كوسيط لها و من ثم وضع محتوياتها ضمن الملف source.dat و ليس عليك هنا إلا إن تضع عنوان البروكسي(proxy address) و المنفذ(proxy port) بين " "

و أتمنى أن يكون ذلك ما تحتاجه;)

public static void readURL(String url) throws IOException {

    System.getProperties().put( "proxySet", "true" );
    System.getProperties().put( "proxyHost", proxy address);
    System.getProperties().put( "proxyPort", proxy port);

    urlAddress = new URL(url);
    BufferedReader in = new BufferedReader(
				new InputStreamReader(
				urlAddress.openStream()));

    RandomAccessFile source = new RandomAccessFile("Source.dat","rw");

    String inputLine;

    while ((inputLine = in.readLine()) != null)
      source.writeBytes(inputLine);
    in.close();
    source.close();
  }
#11

سوف اجرب هذه الطريقة و اتمنى ان تنجح...

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#12

لم تنجح و هذا كود البرنامج جربوا فيه اخواني جميعكم هدية مني

mysql.zip

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#13

برنامج بسيط و جميل للاتصال بقواعد بيانات من نوع Mysql

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#14

بعدما يعمل رح انقله للارشيف بس خليه يشتغل اول لذا ارجوا من اخواني المساعدة

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#16

اخي الكود موجود و هذا رابط الملف

http://ramy.ws/Mysql.zip

يرجى المساعدة و اتفاعل من الاخوان البقية....

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#17

وينكم يا شباب تحركوا شوي .... الموضوع مهم لكل واحد مننا

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

#18

السلام عليكم :)

انا حبيت ارد بس عشان تعرف اني اتابع الموضوع كل مره لكن ما باليد حيله،، ليه ما تسأل سؤال بموقع الجافا ؟

http://java.sun.com راح تلقى منتدى بالموقع :) اسال هناك .. كلهم خبراء بهذا المجال

#19

سالت هناك الموضوع صارله اسبوع ردوا علي ثلاثة اربعة و من ثم رديت انا و لم احد يرد بعدها

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why

هذا الموضوع مغلق.

مواضيع مشابهة