Why can't the returned json data be converted into an array?
({"Name": "liang", "data": "fffff automatically replies to the system:
[11:31:59] the agent has received the goods and is waiting for receiving the goods. [Mel]
[] The goods have been imported into the warehouse [MEL]
[] The goods are equipped with flights and sent to the designated port 44444 [MEL]
[] The goods have arrived at the customs clearance port. Please wait for [China]
[] Scanning for collection in Guangdong Dongguan distribution center
[] The loading scanning will be carried out at the distribution center in Dongguan, Guangdong province, and will be sent to the distribution center in Chengdu, Sichuan province.
[] Conduct a gossip scan at the dial-up center in Chengdu, Sichuan province
[] A parcel scan is performed at the Chengdu distribution center in Sichuan.
[] From Chengdu sub-Distribution Center, Sichuan province, this transshipment destination: Sichuan Chengdu Pixian company
[] Express parcels will be delivered soon when you arrive at the destination outlets of Sichuan Chengdu Pixian company.
[] Arrived at the destination outlet Sichuan Chengdu Pixian company Hengchuang branch, express delivery will soon be delivered
[] A dispatching scan was conducted in Hengchuang branch of Sichuan Chengdu Pixian County company. The dispatching salesman: Wang 22211111; Contact number: 11111111111
[] The courier was scanned by the Hengchuang branch of Sichuan Chengdu Pixian County company.
"})
$ Curl = curl_init ();
Curl_setopt ($ curl, CURLOPT_URL, $ query_link );
Curl_setopt ($ curl, CURLOPT_HEADER, 0 );
Curl_setopt ($ curl, CURLOPT_RETURNTRANSFER, 1 );
Curl_setopt ($ curl, CURLOPT_USERAGENT, $ _ SERVER ['http _ USER_AGENT ']);
Curl_setopt ($ curl, CURLOPT_TIMEOUT, 5 );
$ Get_content1 = curl_exec ($ curl );
$ Get_content2 = json_decode ($ get_content1 );
Print_r ($ get_content2 );
Print_r ($ get_content1 );
Exit ();
Get_content2 is a null value. why cannot it be converted.
Reply to discussion (solution)
Code missing !!
Function for reading content
The data you posted is enclosed in parentheses! The format is not correct, so it cannot be decoded.
Is there a format problem with the printed data you returned?
What is it that filters out or escapes it \