Jump to content

[SOLVED] Table Insert Error, LIMITS ?!?


shlomikalfa

Recommended Posts

Since Last Night - Haven't slept, Please Help !!! PLEASE !

 

my php script part:

$title = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["title"]);
$cat = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["categ"]);
$scat = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["sbcat"]);
$linktype = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["lnktp"]);
$links = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["links"]);
$linkspass = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["lnkpa"]);
$slinks = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["slink"]);
$slinkspass = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["slkpa"]);
$description = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["descr"]);
$piclinks = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["picln"]);
$extended = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["exten"]);
$access = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["acces"]);
$credit = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["credt"]);

$sql = 'INSERT INTO `db1`.`downloads` (
`Title`,
`Category`,
`Subcategory`,
`Type`,
`Links`,
`LinksPass`,
`SLinks`,
`SLinksPass`,
`Description`,
`PicLinks`,
`ExraInfo`,
`ExtraLinks`,
`Credits`,
`Date`,
`Uploader`,
`Downloads`,
`Comments`
)
VALUES ("'.mysql_real_escape_string($title).'",
"'.mysql_real_escape_string($cat).'",
"'.mysql_real_escape_string($scat).'",
"'.mysql_real_escape_string($linktype).'",
"'.mysql_real_escape_string($links).'",
"'.mysql_real_escape_string($linkspass).'",
"'.mysql_real_escape_string($slinks).'",
"'.mysql_real_escape_string($slinkspass).'",
"'.mysql_real_escape_string($description).'",
"'.mysql_real_escape_string($piclinks).'",
"'.mysql_real_escape_string($extended).'",
"'.mysql_real_escape_string($access).'",
"'.mysql_real_escape_string($credit).'",
"",
"'.$UserName.'",
"","")';
//echo $sql;
$result = mysql_query($sql, $link);
if (!$result) {
	echo "DB Error, could not query the database";
	echo 'MySQL Error: ' . mysql_error();
	exit;
}

 

when i'm trying to download these links (with a VB scripted program) the first one manages to insert a new entry on the table

http://localhost/Post.php?categ=Movies&sbcat=Action&lnktp=[RS.com] RapidShare.com&title=The Bourne Ultimatum (2007).DVDSCR.XViD-iMBT-recoded&links=http://rapidshare.com/files/50065697/the.bourne.ultimatum.part01.rar    http://rapidshare.com/files/50069269/the.bourne.ultimatum.part02.rar    http://rapidshare.com/files/50072574/the.bourne.ultimatum.part03.rar    http://rapidshare.com/files/50075832/the.bourne.ultimatum.part04.rar    http://rapidshare.com/files/50079233/the.bourne.ultimatum.part05.rar    http://rapidshare.com/files/50083574/the.bourne.ultimatum.part06.rar    http://rapidshare.com/files/50087918/the.bourne.ultimatum.part07.rar    http://rapidshare.com/files/50093325/the.bourne.ultimatum.part08.rar    http://rapidshare.com/files/50097852/the.bourne.ultimatum.part09.rar    http://rapidshare.com/files/50102815/the.bourne.ultimatum.part10.rar    http://rapidshare.com/files/50104477/the.bourne.ultimatum.part11.rar  &lnkpa=warez-bb.org&slink=http://www.mediafire.com/?48mmnxmvxzj  http://www.mediafire.com/?f10zaignms0  http://www.mediafire.com/?6xjnnyxmqjz  http://www.mediafire.com/?dxbhtddwbyi  http://www.mediafire.com/?4oyumlxn01h  http://www.mediafire.com/?1nfe9nqt0t1  http://www.mediafire.com/?ee4j1mvlyin  http://www.mediafire.com/?ealk1xdco2h &slkpa=&descr=The Bourne Ultimatum (2007)  file size...............: 999.02 MB  Video Codec ......: XviD  Video Quality .....: ~1286 kbps  Resolution .........: 640x272  Audio Codec ......: MP3 CBR  Audio Bitrate ......: 128  Aspect Ratio .......: 2.35:1  Language ...........: English/French/Arabic/Russian/Spanish  IMDb URL............: http://www.imdb.com/title/tt0440963/  IMDB Rating ........: 8.6/10 (17,669 votes)&picln=http://i12.tinypic.com/6crqmog.jpg  http://i11.tinypic.com/669o8ig.jpg  http://i18.tinypic.com/6fk9e88.jpg  http://i11.tinypic.com/52zribs.jpg&exten=http://www.imdb.com/title/tt0440963/ &acces=&credt=Candyman03 | merlyn2007&credt=Candyman03 | merlyn2007&usrid=SDS-CB3F001E9EAr949883423.577173rgnZ684098594.087977SIKF829405596.555616WBEk589817832.06856qruz714493830.454579mqrX865880

 

http://localhost/Post.php?categ=Movies&sbcat=Action&lnktp=[RS.com] RapidShare.com&title=The Bourne Ultimatum (2007) DVDSCR.XViD-iMBT-recoded &links=http://rapidshare.com/files/50065697/the.bourne.ultimatum.part01.rar|CR||CR||CR||LF|http://rapidshare.com/files/50069269/the.bourne.ultimatum.part02.rar|CR||CR||CR||LF|http://rapidshare.com/files/50072574/the.bourne.ultimatum.part03.rar|CR||CR||CR||LF|http://rapidshare.com/files/50075832/the.bourne.ultimatum.part04.rar|CR||CR||CR||LF|http://rapidshare.com/files/50079233/the.bourne.ultimatum.part05.rar|CR||CR||CR||LF|http://rapidshare.com/files/50083574/the.bourne.ultimatum.part06.rar|CR||CR||CR||LF|http://rapidshare.com/files/50087918/the.bourne.ultimatum.part07.rar|CR||CR||CR||LF|http://rapidshare.com/files/50093325/the.bourne.ultimatum.part08.rar|CR||CR||CR||LF|http://rapidshare.com/files/50097852/the.bourne.ultimatum.part09.rar|CR||CR||CR||LF|http://rapidshare.com/files/50102815/the.bourne.ultimatum.part10.rar|CR||CR||CR||LF|http://rapidshare.com/files/50104477/the.bourne.ultimatum.part11.rar |CR||CR||LF|&lnkpa=warez-bb.org&slink=http://www.mediafire.com/?48mmnxmvxzj|CR||LF|http://www.mediafire.com/?f10zaignms0|CR||LF|http://www.mediafire.com/?6xjnnyxmqjz|CR||LF|http://www.mediafire.com/?dxbhtddwbyi|CR||LF|http://www.mediafire.com/?4oyumlxn01h|CR||LF|http://www.mediafire.com/?1nfe9nqt0t1|CR||LF|http://www.mediafire.com/?ee4j1mvlyin|CR||LF|http://www.mediafire.com/?ealk1xdco2h &slkpa=&descr=The Bourne Ultimatum (2007)|CR||LF|file size...............: 999.02 MB|CR||LF|Video Codec ......: XviD|CR||LF|Video Quality .....: ~1286 kbps|CR||LF|Resolution .........: 640x272|CR||LF|Audio Codec ......: MP3 CBR|CR||LF|Audio Bitrate ......: 128|CR||LF|Aspect Ratio .......: 2.35:1|CR||LF|Language ...........: English/French/Arabic/Russian/Spanish|CR||LF|IMDb URL............: http://www.imdb.com/title/tt0440963/|CR||LF|IMDB Rating ........: 8.6/10 (17,669 votes)&picln=http://i12.tinypic.com/6crqmog.jpg|CR||LF|http://i11.tinypic.com/669o8ig.jpg|CR||LF|http://i18.tinypic.com/6fk9e88.jpg|CR||LF|http://i11.tinypic.com/52zribs.jpg&exten=http://www.imdb.com/title/tt0440963/&acces=&credt=Candyman03 | merlyn2007&credt=Candyman03 | merlyn2007&usrid=SDS-CB3F001E9EAr949883423.577173rgnZ684098594.087977SIKF829405596.555616WBEk589817832.06856qruz714493830.454579mqrX865880

 

however the second one fails !

- why ?!

 

P.S: Is there any other way you might suggest using instead of just downloading the URL ?! (via an external program and not IE!)

 

Since Last Night - Haven't slept, Please Help !!! PLEASE !

Link to comment
Share on other sites

[move].:: Renewed Post::.[/move]

 

I want to Send Data inputed in my program into a MySQL DB thus i am collecting all the info from my GUI and

downloading a URL which fits the data that should be sent.

 

my php script part:

$title = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["title"]);
$cat = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["categ"]);
$scat = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["sbcat"]);
$linktype = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["lnktp"]);
$links = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["links"]);
$linkspass = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["lnkpa"]);
$slinks = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["slink"]);
$slinkspass = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["slkpa"]);
$description = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["descr"]);
$piclinks = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["picln"]);
$extended = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["exten"]);
$access = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["acces"]);
$credit = preg_replace('~%([0-9a-f])([0-9a-f])~ei', 'chr(hexdec("\\1\\2"))', $_GET["credt"]);

$sql = 'INSERT INTO `db1`.`downloads` (
`Title`,
`Category`,
`Subcategory`,
`Type`,
`Links`,
`LinksPass`,
`SLinks`,
`SLinksPass`,
`Description`,
`PicLinks`,
`ExraInfo`,
`ExtraLinks`,
`Credits`,
`Date`,
`Uploader`,
`Downloads`,
`Comments`
)
VALUES ("'.mysql_real_escape_string($title).'",
"'.mysql_real_escape_string($cat).'",
"'.mysql_real_escape_string($scat).'",
"'.mysql_real_escape_string($linktype).'",
"'.mysql_real_escape_string($links).'",
"'.mysql_real_escape_string($linkspass).'",
"'.mysql_real_escape_string($slinks).'",
"'.mysql_real_escape_string($slinkspass).'",
"'.mysql_real_escape_string($description).'",
"'.mysql_real_escape_string($piclinks).'",
"'.mysql_real_escape_string($extended).'",
"'.mysql_real_escape_string($access).'",
"'.mysql_real_escape_string($credit).'",
"",
"'.$UserName.'",
"","")';
//echo $sql;
$result = mysql_query($sql, $link);
if (!$result) {
	echo "DB Error, could not query the database";
	echo 'MySQL Error: ' . mysql_error();
	exit;
}

 

The Links that are used to connect to the PHP PAGE:

- when i'm trying to download these links (with a VB scripted program) the first one manages to insert a new entry on the table.

 

http://localhost/Post.php?categ=Movies&sbcat=Action&lnktp=[RS.com] RapidShare.com&title=The Bourne Ultimatum (2007).DVDSCR.XViD-iMBT-recoded&links=http://rapidshare.com/files/50065697/the.bourne.ultimatum.part01.rar    http://rapidshare.com/files/50069269/the.bourne.ultimatum.part02.rar    http://rapidshare.com/files/50072574/the.bourne.ultimatum.part03.rar    http://rapidshare.com/files/50075832/the.bourne.ultimatum.part04.rar    http://rapidshare.com/files/50079233/the.bourne.ultimatum.part05.rar    http://rapidshare.com/files/50083574/the.bourne.ultimatum.part06.rar    http://rapidshare.com/files/50087918/the.bourne.ultimatum.part07.rar    http://rapidshare.com/files/50093325/the.bourne.ultimatum.part08.rar    http://rapidshare.com/files/50097852/the.bourne.ultimatum.part09.rar    http://rapidshare.com/files/50102815/the.bourne.ultimatum.part10.rar    http://rapidshare.com/files/50104477/the.bourne.ultimatum.part11.rar  &lnkpa=warez-bb.org&slink=http://www.mediafire.com/?48mmnxmvxzj  http://www.mediafire.com/?f10zaignms0  http://www.mediafire.com/?6xjnnyxmqjz  http://www.mediafire.com/?dxbhtddwbyi  http://www.mediafire.com/?4oyumlxn01h  http://www.mediafire.com/?1nfe9nqt0t1  http://www.mediafire.com/?ee4j1mvlyin  http://www.mediafire.com/?ealk1xdco2h &slkpa=&descr=The Bourne Ultimatum (2007)  file size...............: 999.02 MB  Video Codec ......: XviD  Video Quality .....: ~1286 kbps  Resolution .........: 640x272  Audio Codec ......: MP3 CBR  Audio Bitrate ......: 128  Aspect Ratio .......: 2.35:1  Language ...........: English/French/Arabic/Russian/Spanish  IMDb URL............: http://www.imdb.com/title/tt0440963/  IMDB Rating ........: 8.6/10 (17,669 votes)&picln=http://i12.tinypic.com/6crqmog.jpg  http://i11.tinypic.com/669o8ig.jpg  http://i18.tinypic.com/6fk9e88.jpg  http://i11.tinypic.com/52zribs.jpg&exten=http://www.imdb.com/title/tt0440963/ &acces=&credt=Candyman03 | merlyn2007&credt=Candyman03 | merlyn2007&usrid=SDS-CB3F001E9EAr949883423.577173rgnZ684098594.087977SIKF829405596.555616WBEk589817832.06856qruz714493830.454579mqrX865880

 

however the second one fails ! it seems like it doesn't even reach the page... (nothing returned from page...)

 

http://localhost/Post.php?categ=Movies&sbcat=Action&lnktp=[RS.com] RapidShare.com&title=The Bourne Ultimatum (2007) DVDSCR.XViD-iMBT-recoded &links=http://rapidshare.com/files/50065697/the.bourne.ultimatum.part01.rar|CR||CR||CR||LF|http://rapidshare.com/files/50069269/the.bourne.ultimatum.part02.rar|CR||CR||CR||LF|http://rapidshare.com/files/50072574/the.bourne.ultimatum.part03.rar|CR||CR||CR||LF|http://rapidshare.com/files/50075832/the.bourne.ultimatum.part04.rar|CR||CR||CR||LF|http://rapidshare.com/files/50079233/the.bourne.ultimatum.part05.rar|CR||CR||CR||LF|http://rapidshare.com/files/50083574/the.bourne.ultimatum.part06.rar|CR||CR||CR||LF|http://rapidshare.com/files/50087918/the.bourne.ultimatum.part07.rar|CR||CR||CR||LF|http://rapidshare.com/files/50093325/the.bourne.ultimatum.part08.rar|CR||CR||CR||LF|http://rapidshare.com/files/50097852/the.bourne.ultimatum.part09.rar|CR||CR||CR||LF|http://rapidshare.com/files/50102815/the.bourne.ultimatum.part10.rar|CR||CR||CR||LF|http://rapidshare.com/files/50104477/the.bourne.ultimatum.part11.rar |CR||CR||LF|&lnkpa=warez-bb.org&slink=http://www.mediafire.com/?48mmnxmvxzj|CR||LF|http://www.mediafire.com/?f10zaignms0|CR||LF|http://www.mediafire.com/?6xjnnyxmqjz|CR||LF|http://www.mediafire.com/?dxbhtddwbyi|CR||LF|http://www.mediafire.com/?4oyumlxn01h|CR||LF|http://www.mediafire.com/?1nfe9nqt0t1|CR||LF|http://www.mediafire.com/?ee4j1mvlyin|CR||LF|http://www.mediafire.com/?ealk1xdco2h &slkpa=&descr=The Bourne Ultimatum (2007)|CR||LF|file size...............: 999.02 MB|CR||LF|Video Codec ......: XviD|CR||LF|Video Quality .....: ~1286 kbps|CR||LF|Resolution .........: 640x272|CR||LF|Audio Codec ......: MP3 CBR|CR||LF|Audio Bitrate ......: 128|CR||LF|Aspect Ratio .......: 2.35:1|CR||LF|Language ...........: English/French/Arabic/Russian/Spanish|CR||LF|IMDb URL............: http://www.imdb.com/title/tt0440963/|CR||LF|IMDB Rating ........: 8.6/10 (17,669 votes)&picln=http://i12.tinypic.com/6crqmog.jpg|CR||LF|http://i11.tinypic.com/669o8ig.jpg|CR||LF|http://i18.tinypic.com/6fk9e88.jpg|CR||LF|http://i11.tinypic.com/52zribs.jpg&exten=http://www.imdb.com/title/tt0440963/&acces=&credt=Candyman03 | merlyn2007&credt=Candyman03 | merlyn2007&usrid=SDS-CB3F001E9EAr949883423.577173rgnZ684098594.087977SIKF829405596.555616WBEk589817832.06856qruz714493830.454579mqrX865880

 

- why ?!

 

P.S: Is there any other way you might suggest using instead of just downloading the URL ?! (via an external program and not IE!)

 

Since Last Night - Haven't slept, Please Help !!! PLEASE !

Link to comment
Share on other sites

first the URL's are not correctly crafted ie a space should be %20, plus the GET has a limit

 

if it seam like the page isn't getting the request then add print_r($_GET) to the start to check.. it would seam to me that he problem is in the VB itself!

 

why are you using PHP for this ?

VB can talk directly to MySQL ???

Link to comment
Share on other sites

my server domain doesn't allow non-specified IP connections to the MySQL DB !

thus i'm having to use php to gap it up.

- is there any other way you can suggest ?!

 

- as i was saying the first URL (with spaces...) works just fine, but that second one isn't !!!

- what's "GET" limit ?!

 

THANKS...

Link to comment
Share on other sites

dude i've just wrote what my app does.

- it sends data into the MySQL DB.

 

if there are any "other" ways you know about - please share it with me!

 

i know that the 2nd one has TABs,CRs,LFs,CRLFs changed into |TB|,|CR|,|LF|,|CRLF| but my question is: can that be the issue ?!

Link to comment
Share on other sites

All i know about your VB App is it sends data, so theirs no way i can suggest anything about replacing that as it depends on the data and where that data is comming from in the first place,

 

yes the problem could be with the URLs being either to long or being incorrectly crafted..

 

first the URL's are not correctly crafted ie a space should be %20, plus the GET has a limit

 

if it seam like the page isn't getting the request then add print_r($_GET) to the start to check.. it would seam to me that he problem is in the VB itself!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.