Show a .xml document, which contains automatically generated integers. How could i add those?



Im trying to show a specific users purchased.xml document, my problem with that is the following:


The Url does contain two generated integers. Without those two numbers i cant view their xml document.


Example purchased.xml document:


Example xml document


What im trying to do:



<?php
$requested['username'] = '_perverted';
$requested['integers'] = '**SHOULDBEAUTOMATICALLYADDED**';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'hhttp://outfits.zwinky.com');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, '/users/'.$requested['integers'].'/'.$requested['username'].'/purchased.xml']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, $global['cookie']);
curl_setopt($ch, CURLOPT_COOKIEJAR, $global['cookie']);
$data = curl_exec($ch);
curl_close($ch);
echo $data;
?>


So i kinda want to send the Username with a Form element to this PHP document and it should show the requested xml file.


My only problems are the integers: 220/287, which get generated for each user. Does anyone might have a idea, how i could get those numbers?


Fiddler2 shows them incase I visit a usernames profile:


For example i visit: http://ift.tt/1sgeMy8 and got fiddler open, then it would show me exactly what im searching for.


Example xml document


Does anyone have a idea?


No comments:

Post a Comment