• 26-05-2021, 15:34:55
    #1
    Merhaba,
    php curl ile port olmadan veri çekebiliyorum ama "adres:8087/read/kantar" şeklinde json data veren url den veri gelmiyor bunun için php de ne gibi ayar yapılması lazım veya sunucuda konu ile ilgili bilgisi olan arkadaşlardan yardım talep ediyorum.
  • 26-05-2021, 16:09:05
    #2
    curl_setopt($ch, CURLOPT_PORT, 8087);

    bunu da curl eklermisin hocam
  • 26-05-2021, 16:09:50
    #3
    Royxr_cod adlı üyeden alıntı: mesajı görüntüle
    curl_setopt($ch, CURLOPT_PORT, 8087);

    bunu da curl eklermisin hocam
    denedim hocam malesef hatta url den 8087 çıkarıp da denedim olmadı
  • 26-05-2021, 16:13:17
    #4
    sunucu olarak ne kullanıyorsun
  • 26-05-2021, 16:26:22
    #5
    Royxr_cod adlı üyeden alıntı: mesajı görüntüle
    sunucu olarak ne kullanıyorsun
    Linux centos 8 direct admin panel var
  • 26-05-2021, 16:28:30
    #6
    SELINUX BULUP yolunu tam hatırlamıyorum şu şekil yaparsan sorun çözülecektir gibime geliyor SELINUX=disabled şu şekil güncele
  • 26-05-2021, 16:38:48
    #7
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'http://adres:8087/read/kantar');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'X-Requested-With: XMLHttpRequest'
    ));
    $server_output = curl_exec($ch);
    curl_close($ch);
    $data=json_decode($server_output);
    print_r($data);


    Dener misiniz olacak mı?
  • 26-05-2021, 16:39:45
    #8
    Royxr_cod adlı üyeden alıntı: mesajı görüntüle
    SELINUX BULUP yolunu tam hatırlamıyorum şu şekil yaparsan sorun çözülecektir gibime geliyor SELINUX=disabled şu şekil güncele
    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    # enforcing - SELinux security policy is enforced.
    # permissive - SELinux prints warnings instead of enforcing.
    # disabled - No SELinux policy is loaded.
    SELINUX=disabled
    # SELINUXTYPE= can take one of three values:
    # targeted - Targeted processes are protected,
    # minimum - Modification of targeted policy. Only selected processes are protected.
    # mls - Multi Level Security protection.
    SELINUXTYPE=targeted


    Bu şekildeymiş.
  • 26-05-2021, 16:42:19
    #9
    salimsevindik adlı üyeden alıntı: mesajı görüntüle
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'http://adres:8087/read/kantar');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'X-Requested-With: XMLHttpRequest'
    ));
    $server_output = curl_exec($ch);
    curl_close($ch);
    $data=json_decode($server_output);
    print_r($data);


    Dener misiniz olacak mı?

    Malesef hocam ben cento8 den olduğunu düşünüyor centos 7 sunucuda da aynı panel ve alt yapı var mecburen portlu adresi cento7 sunucuma atıp json datayı port olmadan 7 sunucusundan alıyorum kulağı tersten tuttum biraz. Çözemedim