كيف يتم اتصال برنامج جافا (تطبيق) بالمخدمات الموجودة على الانترنت و لكن عبر مخدم بروكسي
وشكرا
كيف يتم اتصال برنامج جافا (تطبيق) بالمخدمات الموجودة على الانترنت و لكن عبر مخدم بروكسي
وشكرا
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
ماذا بكم الا يوجد احد يستخدم الانترنت في برامجه و معظمنا يتصل من وراء بروكسي الا يوجد احد لديه افكار يساعدنا بها: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
ياخي لا اعتقد انك تحتاج الى كود للبروكسي !
مادام انك متصل بالانترنت (يعني الاتصال تم انشاءه عن طريق نظام التشغيل لديك)
خلاص ما يحتاج برنامجك انه يعرف البروكسي !
الا اذا كنت تريد ان تجعل برنامجك هو الذي ينشئ الاتصال
فهذا شئ اخر ...
وارجو ان تضع المشكلة اللي واجهتك
الكود اللي جربته ولم يعمل مثلا مع الاخطاء اللي ظهرت لك ..
اخي الاتصال انشئ و لكن الخطا التالي يظهر لي في البرنامج :
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
اذكر انه هناك طريقة و هي ضرورية ليتمكن البرنامج من التعرف على البروكسي و الاتصال عن طريقه؟؟؟
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
طبعا انا احاول الاتصال بـ مخدم قواعد بيانات 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
يا شباب يا عالم يا اخوان
ماذا بكم: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
انا ما استخدم الانترنت ببرامجي :D ..
لكن المجال واسع و فيه امور كثيره
طيب ليش ما تعرض مشكلتك في منتدى الجافا (الصن) الرسمي أكيد راح يعطونك الحل :)
تقوم هذه الطريقة بالاتصال بالانترنت و من ثم قراءة الصفحة التي عنوانها هو الـ 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();
}سوف اجرب هذه الطريقة و اتمنى ان تنجح...
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
برنامج بسيط و جميل للاتصال بقواعد بيانات من نوع 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
بعدما يعمل رح انقله للارشيف بس خليه يشتغل اول لذا ارجوا من اخواني المساعدة
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
انا نزلت الملف .. ماشفت و لا كود :rolleyes:
اخي الكود موجود و هذا رابط الملف
يرجى المساعدة و اتفاعل من الاخوان البقية....
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
وينكم يا شباب تحركوا شوي .... الموضوع مهم لكل واحد مننا
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
السلام عليكم :)
انا حبيت ارد بس عشان تعرف اني اتابع الموضوع كل مره لكن ما باليد حيله،، ليه ما تسأل سؤال بموقع الجافا ؟
http://java.sun.com راح تلقى منتدى بالموقع :) اسال هناك .. كلهم خبراء بهذا المجال
سالت هناك الموضوع صارله اسبوع ردوا علي ثلاثة اربعة و من ثم رديت انا و لم احد يرد بعدها
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
هذا الموضوع مغلق.