Jump to content

Where is the extra __ coming from?


idire

Recommended Posts

I'm trying to make a script which gets information from a parser, but the GET value on the parser gets two underscores added to it.

 

Why?

 

This is the code:

 

Page 1:

echo '<br><br>'.$temp.'<br><br>';
$link = 'http://www.rstracking.com/parser.php?change='.$temp;
echo '<br>'.$link.'<br><br>';
$file = file_get_contents($link);
echo '<br>File contents: '.$file.'<br>';

 

Page 2 (parser)

$username = $_GET['change'];

$sql = mysql_query("SELECT * FROM `change` WHERE username = '$username' LIMIT 0,1");
if(mysql_num_rows($sql) == '0') {
     //echo 'Sorry, this user is not signed up';
     echo 'Username1: '.$username;
}

 

 

Output: (on page1)

 

idire_2005

 

http://www.rstracking.com/parser.php?change=idire_2005

 

File contents: Username1: idire_2005__

Link to comment
https://forums.phpfreaks.com/topic/127176-where-is-the-extra-__-coming-from/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.