fork download
  1. <?php
  2.  
  3. $array = [
  4. 'id' => 498,
  5. 'value2' => 'యూట్యూబ్‌లో “భరత్ అనే నేను” అన్ కట్ సీన్లు..!',
  6. 'value1' => 'కొరటాల శివ దర్శకత్వం లో సూ...',
  7. 'value3' => '525722.jpg'
  8. ];
  9.  
  10. sendMessage($array);
  11.  
  12. function sendMessage($array) {
  13. $content = array(
  14. "en" => $array['value1']
  15. );
  16. $headings = array(
  17. "en" => $array['value2']
  18. );
  19. $hashes_array = array();
  20.  
  21. $fields = array(
  22. 'app_id' => "31fe2347-5f39-4d9f-2222-79bf542f00f9",
  23. 'included_segments' => array(
  24. 'All'
  25. ),
  26. 'data' => array(
  27. "foo" => "bar"
  28. ),
  29. 'contents' => $content,
  30. 'headings' => $headings,
  31. 'url' => 'http://w...content-available-to-author-only...9.in/view.php?id=' . $array['id'],
  32. 'chrome_web_image' => 'http://w...content-available-to-author-only...9.in/admin/user_images/' . $array['value3'],
  33.  
  34. );
  35. print_r($fields);
  36. }
Success #stdin #stdout 0.02s 23560KB
stdin
Standard input is empty
stdout
Array
(
    [app_id] => 31fe2347-5f39-4d9f-2222-79bf542f00f9
    [included_segments] => Array
        (
            [0] => All
        )

    [data] => Array
        (
            [foo] => bar
        )

    [contents] => Array
        (
            [en] => కొరటాల శివ దర్శకత్వం లో సూ...
        )

    [headings] => Array
        (
            [en] => యూట్యూబ్‌లో “భరత్ అనే నేను” అన్ కట్ సీన్లు..!
        )

    [url] => http://w...content-available-to-author-only...9.in/view.php?id=498
    [chrome_web_image] => http://w...content-available-to-author-only...9.in/admin/user_images/525722.jpg
)