Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 24 Jun 2020, 19:32
Beergeeksf Beergeeksf is offline
 
Join Date: Jan 2018
vB5 API help - latest / trending posts list only returns if < 5 days

I created a simple PHP script that loads the vB5 API and generates a simple JSON list of the trending posts. (See sample code below). The problem is that I can't get the scripts to generate anything for more than a couple days. Ideally I'd like to get the trending posts in the last 7 days, last 31 days, etc. But it I go over 3-5 days, nothing is returned. Any suggestions?

Sample code to load the vB5 API, and get the last 20 days of posts:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If I change the $search_json code above 5 days, nothing is returned, no error is create, just blank output.

Any help is greatly appreciated.

Cheers,
Jeff
Reply With Quote
  #2  
Old 27 Jun 2020, 18:24
delicjous's Avatar
delicjous delicjous is offline
 
Join Date: Nov 2014
You could use template for this also... just search for initialResult in templates for examples. There is also a ignore cache as search option . You could try this.
__________________
vBulletin-Forum.de closed!
Reply With Quote
  #3  
Old 29 Jun 2020, 19:26
Beergeeksf Beergeeksf is offline
 
Join Date: Jan 2018
An update -- one of the problems was actually a silent json_encode error in PHP -- once I checked for json errors I saw that error. Wrapping all of the thread details in utf8_encode() fixed that error:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Still seeing inconsistent results, but at least I get results every time now.

Cheers,
Jeff
Reply With Quote
Reply


Tags
api, json, vb5 api


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 22:03.

Layout Options | Width: Wide Color: