I want to create a GD Image in PHP that I can use in my signature in vb forums like this. I want to split it and get the persons Username and output it. But I don't know how.
Printable View
I want to create a GD Image in PHP that I can use in my signature in vb forums like this. I want to split it and get the persons Username and output it. But I don't know how.
Split what?
The current page the GD Image is on.
I don't understand, can you elaborate?
Ok, I want to create a GD Image, that when I use it on a vBulletin forum as my signature, splits the page that the GD Image is on and finds out their username.
Like splitting the
"Welcome, SlicedCheese." bit. It's hard for me to explain.
I've tried splitting the forum homepage but the
"Welcome, <USERNAME>." bit doesn't exists becuase you have to be logged in to see that.
Why can't you just pass the username as a GET parameter?
[img]http://myserver.com/gdimage.php?user=SlicedCheese[/img]
Because i want it to fetch the Username by splitting the page. Im going to be using this as a signature and I want the username of the person viewing the page with the GD image on displayed.
But wouldn't it be easy enough for each user to have their own link that they can just copy and paste in to their signature? Basically what you are asking is impossible. If you are having problems with .php files in image links you can use URL rewriting to fake a .jpg link or something.
and BTW your use of the word "splitting" is what confused me before, I think you mean "parsing" or something. ;)
Basically you want to receive the source code that the user has in viewing the forum so that you can look up his username and embed that into the image, similar to the images that embed the IP and OS, right?
Impossible, sorry. IP and OS are things that the browser sends automatically. You have no way of getting the source code of the referrer. Of course, you can make a request to the referrer page, but since you're not in the same session, you won't get the same page, especially not the same source.