Jump to content

Receiving data StringRegExp jQuery


Recommended Posts

The number to get is dynamically javascript generated depending on the date  ;)

$date = "29/06/2016"
$code = StringRegExpReplace($date, '(\d+)/(\d+)/(\d+)', "$3$2$1")
$url = "http://www.millipiyango.gov.tr/sonuclar/cekilisler/sanstopu/" & $code & ".json"
$data = BinaryToString(InetRead($url))
$receivedata = StringRegExp($data, 'hafta":(\d+)', 1)
MsgBox(0,"test", "Hafta:" & $receivedata[0])

 

Link to comment
Share on other sites

In the source code of the main page I saw this :

function tarihSecildi (item) {
	var url = 'cekilisler/sanstopu/' + item.value + '.json';      <<<<<<<<<<<<<<<<<<<<<<<<<<<<
	jQuery.getJSON(url, function(json) {
		jQuery('#sanstopu-hafta').html(json.data.hafta);          <<<<<<<<<<<<<<<<<<<<<<<<<<<<

"item.value" = date,  "cekilisler/sanstopu/+date+.json" = name of the json, "#sanstopu-hafta" =  data to get  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...