Pouvez vous me traduire ce code Python en PHP ?

Résolu
#!/usr/bin/python
from random import randint, choice
from requests import get
from re import findall

maximum = (6251476 - 1) / 25

nbPage = randint(0, maximum) * 25 + 1

liste = get('http://ws.jeuxvideo.com/forums/0-50-0-1-0-%d-0-0.xml' % nbPage, auth=('appandr','e32!cdf'))
liste = findall('<lien_topic>jv:/(.+?)xml<', liste.content)

print 'Location: http://www.jeuxvideo.com' + choice(liste) + '.htm'
print "Content-type: text/html"
print

Merci si vous le pouvez.

1 réponse

  1. Dit moi la fonction que ce code fais et je te le refais en PhP.
    Car je ne fais pas de python ! ^^'